DEV Community

Discussion on: The Maybe data type in JavaScript

Collapse
 
vonheikemen profile image
Heiker

I think is more about returning a meaningful "empty" value, one that doesn't stop execution in unexpected ways. That's half the story, like many patterns in functional programming, this one encourages extension through function composition. Maybe a more practical example could help you see it, I wrote this one last year.