<code>m$ or mapply (/εm@plai/): <u>P -> Q</u> -> <u>P</u> -> <u>Q</u></code>
-> We'll use `m$` as a left-associative infix operator, reminiscent of (the right-associative) `$` which is just ordinary function application (also expressed by mere left-associative juxtaposition). In the class presentation Jim called `m$` `â\97\8f`. In Haskell, it's called `Control.Monad.ap` or `Control.Applicative.<*>`.
+> We'll use `m$` as a left-associative infix operator, reminiscent of (the right-associative) `$` which is just ordinary function application (also expressed by mere left-associative juxtaposition). In the class presentation Jim called `m$` `â\9a«`. In Haskell, it's called `Control.Monad.ap` or `Control.Applicative.<*>`.
<code><=< or mcomp : (Q -> <u>R</u>) -> (P -> <u>Q</u>) -> (P -> <u>R</u>)</code>
u >>= mid == u
mid a >>= k == k a
- Also, Haskell calls `mid` `return` or `pure`, but we've stuck to our terminology in this context.
+ (Also, Haskell calls `mid` `return` or `pure`, but we've stuck to our terminology in this context.) Some authors try to make the first of those Laws look more symmetrical by writing it as:
+
+ (A >>= \a -> B) >>= \b -> C == A >>= (\a -> B >>= \b -> C)
> <small>In Category Theory discussion, the Monad Laws are instead expressed in terms of `join` (which they call `μ`) and `mid` (which they call `η`). These are assumed to be "natural transformations" for their box type, which means that they satisfy these equations with that box type's `map`:
> <pre>map f ○ mid == mid ○ f<br>map f ○ join == join ○ map (map f)</pre>