feedback from anyone who understands these issues better, and will make
corrections.
+Thanks Wren Thornton for helpful comments on these notes (not yet incorporated).
+
+[This page](http://en.wikibooks.org/wiki/Haskell/Category_theory) was a helpful starting point.
+
Monoids
-------
! (!a->!b) --> ! (!a->!b->!c)->!a->!c
--------------------------------------- R->
--> ! (!a->!b)->! (!a->!b->!c)->!a->!c
+
+
+
+<!--
+http://en.wikibooks.org/wiki/Haskell/The_Curry-Howard_isomorphism
+-->
which can be translated straightforwardly into OCaml.
+ For more details, see:
+
+ * [Haskell Wikibook on do-notation](http://en.wikibooks.org/wiki/Haskell/do_Notation)
+ * [Do-notation considered harmful](http://www.haskell.org/haskellwiki/Do_notation_considered_harmful)
+
* If you like the Haskell do-notation, there's [a library](http://www.cas.mcmaster.ca/~carette/pa_monad/) you can compile and install to let you use something similar in OCaml.
* In order to do any printing, Haskell has to use a special `IO` monad. So programs will look like this:
We haven't given you a real implementation of the tree zipper, but only a suggestive notation. We have however told you enough that you should be able to implement it yourself. Or if you're lazy, you can read:
* [[!wikipedia Zipper (data structure)]]
+* [Haskell wikibook on zippers](http://en.wikibooks.org/wiki/Haskell/Zippers)
* Huet, Gerard. ["Functional Pearl: The Zipper"](http://www.st.cs.uni-sb.de/edu/seminare/2005/advanced-fp/docs/huet-zipper.pdf) Journal of Functional Programming 7 (5): 549-554, September 1997.
* As always, [Oleg](http://okmij.org/ftp/continuations/Continuations.html#zipper) takes this a few steps deeper.
`x`".
(Note that the above "do" notation comes from Haskell. We're mentioning it here
-because you're likely to see it when reading about monads. It won't work in
+because you're likely to see it when reading about monads. (See our page on [[Translating between OCaml Scheme and Haskell]].) It won't work in
OCaml. In fact, the `<-` symbol already means something different in OCaml,
having to do with mutable record fields. We'll be discussing mutation someday
soon.)
different types. But it's possible to make the connection between
monads and monoids much closer. This is discussed in [Monads in Category
Theory](/advanced_topics/monads_in_category_theory).
-See also <http://www.haskell.org/haskellwiki/Monad_Laws>.
+
+See also:
+
+* [Haskell Wikibook on Monad Laws](http://www.haskell.org/haskellwiki/Monad_Laws).
+* [Haskell Wikibook on Understanding Monads](http://en.wikibooks.org/wiki/Haskell/Understanding_monads)
+* [Haskell Wikibook on Advanced Monads](http://en.wikibooks.org/wiki/Haskell/Advanced_monads)
+* [Haskell Wikibook on do-notation](http://en.wikibooks.org/wiki/Haskell/do_Notation)
+
Here are some papers that introduced monads into functional programming: