Confused with the for-comprehension to flatMap/Map transformation
TL;DR go directly to the final example I’ll try and recap. Definitions The for comprehension is a syntax shortcut to combine flatMap and map in a way that’s easy to read and reason about. Let’s simplify things a bit and assume that every class that provides both aforementioned methods can be called a monad and … Read more