From 5fc93a66443245db8d583eebe4517fa20a4a1aa7 Mon Sep 17 00:00:00 2001 From: jim Date: Mon, 23 Mar 2015 10:18:51 -0400 Subject: [PATCH 1/1] formating --- topics/week8_safe_division_with_monads.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/topics/week8_safe_division_with_monads.mdwn b/topics/week8_safe_division_with_monads.mdwn index 3e3e14c0..933ded83 100644 --- a/topics/week8_safe_division_with_monads.mdwn +++ b/topics/week8_safe_division_with_monads.mdwn @@ -217,7 +217,7 @@ Wherever we have a well-defined monad, we can define the `mapN` operations for t of their `>>=` and `⇧`/`mid`. The general pattern is: mapN (g : 'a1 -> ... 'an -> 'result) (u1 : 'a1 option) ... (un : 'an option) : 'result option = - u1 >>= (fun x1 -> ... un >>= (fun xn -> ⇧ (g x1 ... xn)) ...) + u1 >>= (fun x1 -> ... un >>= (fun xn -> ⇧(g x1 ... xn)) ...) Our above definitions of `map` and `mapN` were of this form, except we just explicitly supplied the definition of `⇧` for the Option/Maybe monad (namely, in OCamlese, the constructor `Some`). -- 2.11.0