Commit decdfdba authored by Alan H's avatar Alan H

Fix small type error in functor-applicative,-monad post

parent 4817013b
Pipeline #79587323 passed with stage
in 5 minutes and 25 seconds
......@@ -120,7 +120,7 @@ operator. The code `let+ x = a and+ y = b in c`{.ocaml} desugars into
`map`{.ocaml} with its arguments reversed, then it would have type
`('a * 'b) t -> (('a * 'b) -> 'c) -> 'c t`{.ocaml} in this context, as the
lambda in the desugaring takes a pair as an input. Therefore, `(and+)`{.ocaml}
must have type `'a t * 'b t -> ('a * 'b) t`{.ocaml} for it to define an
must have type `'a t -> 'b t -> ('a * 'b) t`{.ocaml} for it to define an
applicative. So, applicatives are about "preserving" the product.
Given:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment