ZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 3 months agoMonadslemmy.worldimagemessage-square28linkfedilinkarrow-up1204
arrow-up1204imageMonadslemmy.worldZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 3 months agomessage-square28linkfedilink
minus-squarePyro@programming.devlinkfedilinkarrow-up3·3 months agoIsn’t your example just the builder pattern?
minus-squaremarcos@lemmy.worldlinkfedilinkarrow-up3·3 months agoA monad is a builder that lets you use previous partial results to make decisions while you build.
minus-squareWhyJiffie@sh.itjust.workslinkfedilinkEnglisharrow-up1·3 months agothat sounds like a regular builder
minus-squaremarcos@lemmy.worldlinkfedilinkarrow-up1·3 months 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?
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.