Lines Matching defs:loop
26 | LESS => loop left
27 | GREATER => loop right
28 and loop LEAF = raise NotFound
29 | loop (RED(k, x, left, right)) = loopShared k x left right
30 | loop (BLACK(k, x, left, right)) = loopShared k x left right
31 in loop tree end
108 let fun loop stack acc =
109 get stack (fn k =>fn x =>fn stack => loop stack (f(k,x,acc))) acc
110 in loop [tree] e end
119 let fun loop stack = get stack (fn k => fn x => (f(k,x); loop)) ()
120 in loop [tree] end
192 let fun loop LEAF = LEAF
193 | loop (RED(k,x,a,b)) =
194 let val a = loop a
196 in RED(k,x,a, loop b) end
197 | loop (BLACK(k,x,a,b)) =
198 let val a = loop a
200 in BLACK(k,x,a, loop b) end
201 in (compare, loop tree, n) end
204 let fun loop LEAF = LEAF
205 | loop (RED(k,x,a,b)) =
206 let val a = loop a
207 in RED(k, f x, a, loop b) end
208 | loop (BLACK(k,x,a,b)) =
209 let val a = loop a
210 in BLACK(k, f x, a, loop b) end
211 in (compare, loop tree, n) end