Comment

Comment by mmaniac

The biggest problem with monads that I am aware of is that they don't compose: if m1 and m2 are monads, then you can't automatically derive a new monad m3 where m1 (m2 a) and m3 a are equivalent.

Monad transformers are one solution to this. This lets you write the composition rules for m2 once, and then reuse them for every m1. A solution, but boilerplatey.

I don't understand algebraic effects quite as well, but my understanding is that they do simply compose.

parent mmaniac 6 months ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton