Back to Fpinscala

09.Hint

answerkey/monads/09.hint.md

latest198 B
Original Source

You want to show that these two are equivalent:

x.flatMap(f).flatMap(g) == x.flatMap(a => f(a).flatMap(g)) compose(compose(f, g), h) == compose(f, compose(g, h))

Rewrite one in terms of the other.