From 23445a4f8be687dbd5be55eea7dcd7e6d2e7de05 Mon Sep 17 00:00:00 2001 From: Jim Pryor Date: Thu, 2 Dec 2010 11:34:34 -0500 Subject: [PATCH 1/1] manip trees tweaks Signed-off-by: Jim Pryor --- manipulating_trees_with_monads.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manipulating_trees_with_monads.mdwn b/manipulating_trees_with_monads.mdwn index 315cb68a..ba990d10 100644 --- a/manipulating_trees_with_monads.mdwn +++ b/manipulating_trees_with_monads.mdwn @@ -498,10 +498,11 @@ Okay, now let's do the same thing for our Tree monad. let rec bind (u : 'a tree) (f : 'a -> 'b tree) : 'b tree = match u with - | Leaf a -> (fun b -> b) (f a) (* see below *) + | Leaf a -> f a;; | Node (l, r) -> (fun l' r' -> Node (l', r')) (bind l f) (bind r f);; (* monadic operations for the TreeT monadic transformer *) + (* NOTE THIS IS NOT YET WORKING --- STILL REFINING *) type ('a, M) treeT = 'a tree M;; -- 2.11.0