ZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 2 days agoMonadslemmy.worldimagemessage-square41fedilinkarrow-up1291arrow-down112
arrow-up1279arrow-down1imageMonadslemmy.worldZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 2 days agomessage-square41fedilink
minus-squarePyro@programming.devlinkfedilinkarrow-up5arrow-down1·2 days agoIsn’t your example just the builder pattern?
minus-squareKache@lemmy.ziplinkfedilinkarrow-up9·edit-22 days 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·2 days agoA monad is a builder that lets you use previous partial results to make decisions while you build.
minus-squareWhyJiffie@sh.itjust.workslinkfedilinkEnglisharrow-up3·2 days agothat sounds like a regular builder
minus-squaremarcos@lemmy.worldlinkfedilinkarrow-up1·2 days 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.