Re:Fantasy Land 1.0
by danidiaz on Thursday September 15, 2016 @02:57AM
(#12503977)
I think one benefit is facilitating "getting to grips" with new code, much like design patterns in a way. Of course, this requires familiarity. If someone tells you something is a "monoid", you instantly know that the somethings can be combined in an associative way, and that there is a "neutral" something that can always be constructed without arguments.
Another benefit is that these abstractions appear again and again under many contexts. Recognizing them allows you to give them a common interface, instead of flatMap for lists, andThen for promises, and so on.
Another benefit is that these abstractions appear again and again under many contexts. Recognizing them allows you to give them a common interface, instead of flatMap for lists, andThen for promises, and so on.