ZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 23 hours agoMonadslemmy.worldimagemessage-square39fedilinkarrow-up1265
arrow-up1265imageMonadslemmy.worldZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 23 hours agomessage-square39fedilink
minus-squarePyro@programming.devlinkfedilinkarrow-up5·14 hours agoIsn’t your example just the builder pattern?
minus-squareKache@lemmy.ziplinkfedilinkarrow-up6·edit-211 hours agoYeah, that explanation is missing the critical point of generically applying external functions through flat_map/bind I think this is a good explanation: https://fsharpforfunandprofit.com/rop/
minus-squaremarcos@lemmy.worldlinkfedilinkarrow-up3·14 hours agoA monad is a builder that lets you use previous partial results to make decisions while you build.
minus-squareWhyJiffie@sh.itjust.workslinkfedilinkEnglisharrow-up1·6 hours agothat sounds like a regular builder
minus-squaremarcos@lemmy.worldlinkfedilinkarrow-up1·4 hours agoIf you regular builders can’t be composed as values… That may be regular, but it doesn’t make them good. Some times you need that, and it’s ok, but that shouldn’t be most times.
Isn’t your example just the builder pattern?
Yeah, that explanation is missing the critical point of generically applying external functions through
flat_map
/bind
I think this is a good explanation: https://fsharpforfunandprofit.com/rop/
A monad is a builder that lets you use previous partial results to make decisions while you build.
that sounds like a regular builder
If you regular builders can’t be composed as values…
That may be regular, but it doesn’t make them good. Some times you need that, and it’s ok, but that shouldn’t be most times.