Upvote!
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
ZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 2 days ago

Monads

lemmy.world

message-square
41
fedilink
279

Monads

lemmy.world

ZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 2 days ago
message-square
41
fedilink
  • Pyro@programming.dev
    link
    fedilink
    arrow-up
    5
    arrow-down
    1
    ·
    2 days ago

    Isn’t your example just the builder pattern?

    • Kache@lemmy.zip
      link
      fedilink
      arrow-up
      9
      ·
      edit-2
      2 days ago

      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/

    • marcos@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      2 days ago

      A monad is a builder that lets you use previous partial results to make decisions while you build.

      • WhyJiffie@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        3
        ·
        2 days ago

        that sounds like a regular builder

        • marcos@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          2 days ago

          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.

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 3.33K users / day
  • 6.14K users / week
  • 9.95K users / month
  • 19.9K users / 6 months
  • 1 local subscriber
  • 26.8K subscribers
  • 1.75K Posts
  • 61.5K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.6
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org