DEV Community

Discussion on: Basic monads in Javascript

Collapse
 
arielgueta profile image
Ariel Gueta

Thanks, I wonder what the implications are for performance?

Collapse
 
rametta profile image
Jason

Typically pretty negligible. The Maybe monad just checks the value against null and undefined and calls the callback function. So, not much happening.

Collapse
 
arielgueta profile image
Ariel Gueta

Yes, but you also create a new callback function for each step, and the gc should clean them up.