▲ 277 ▼ Monads (lemmy.world) submitted 1 year ago by ZILtoid1991@lemmy.world to c/programmer_humor@programming.dev 40 comments fedilink hide all child comments
[–] leftzero@lemmy.dbzer0.com 15 points 1 year ago (3 children) Do you know C#? LINQ? IEnumerable? IEnumerable is a monad. That's how LINQ works. You've been using monads all along. permalink fedilink source hideshow 3 child comments replies: [–] magic_lobster_party@fedia.io 11 points 1 year ago* (2 children) Or for those using Java: Stream is a monad permalink fedilink source parent hideshow 2 child comments replies: [–] pegazz@lemmy.world 7 points 1 year ago (1 child) Optional is my favorite example to give, at this point most people have internalized how to use its map function and how it works permalink fedilink source parent hideshow 1 child comment replies: [–] magic_lobster_party@fedia.io 3 points 1 year ago* (last edited 1 year ago) That’s a good one. A rule of thumb is that if it has map and flatMap (or equivalent), then chances are that it’s a monad. permalink fedilink source parent
[–] magic_lobster_party@fedia.io 11 points 1 year ago* (2 children) Or for those using Java: Stream is a monad permalink fedilink source parent hideshow 2 child comments replies: [–] pegazz@lemmy.world 7 points 1 year ago (1 child) Optional is my favorite example to give, at this point most people have internalized how to use its map function and how it works permalink fedilink source parent hideshow 1 child comment replies: [–] magic_lobster_party@fedia.io 3 points 1 year ago* (last edited 1 year ago) That’s a good one. A rule of thumb is that if it has map and flatMap (or equivalent), then chances are that it’s a monad. permalink fedilink source parent
[–] pegazz@lemmy.world 7 points 1 year ago (1 child) Optional is my favorite example to give, at this point most people have internalized how to use its map function and how it works permalink fedilink source parent hideshow 1 child comment replies: [–] magic_lobster_party@fedia.io 3 points 1 year ago* (last edited 1 year ago) That’s a good one. A rule of thumb is that if it has map and flatMap (or equivalent), then chances are that it’s a monad. permalink fedilink source parent
[–] magic_lobster_party@fedia.io 3 points 1 year ago* (last edited 1 year ago) That’s a good one. A rule of thumb is that if it has map and flatMap (or equivalent), then chances are that it’s a monad. permalink fedilink source parent