3 ms·
> Monadic function composition is just like regular composition, except that the programmer is given the ability to make "f of g of x" do something more than ju
by cabalamat 16y ago
> Monadic function composition is just like regular composition, except that the programmer is given the ability to make "f of g of x" do something more than just pipe the result of g(x) into f. This can look like imperative programming, but it's still purely functional.
> If you're willing to call monads Kleisli arrows instead, then you can even the same syntax to chain monadic computations as "regular" computations.
I have no idea what any of that is meant to mean! Are you just trying to prove wisty's assertion that "Haskell programmers introduce them in the most incredibly obscure double-talk"?
- jrockway 16y agoFunction composition is obscure? Did you take Algebra 1? (I used the term "Kleisli arrow" so that you could Google for something if you wanted to learn more. All you really need to know is that you can use . to pass the output of a regular function into the input of another one, and you can use . to pass the output of a monad into the input of another. Saying it that way is very imprecise, though, and the goal of people explaining things is to say them precisely so that you have some hope of eventually gaining an understanding. You have to bootstrap understanding. Assume you know what a Kleisli arrow is. Then read the rest of the post. Now your assumption is correct!)