• CanadaPlus@lemmy.sdf.org
    link
    fedilink
    arrow-up
    1
    ·
    5 days ago

    That’s a good run down of the “why”. The thing is, there’s way more things that are monads than things that have to be looked at as monads. AFAIK it only comes up directly when you’re using something like IO or State where the monad functions are irreversible.

    From the compiler end, are there optimisations that make use of the monadic structure of, say, a list?