Lines Matching defs:delay
12 fun delay f = LDELAYREF (ref (LDELAYED f))
42 | append (LCONS (e, es)) x = delay (fn () => LCONS (e, append es x))
44 | append x y = delay (fn () => append (force x) y)
54 | SOME x => LCONS(x, delay listfn)
57 delay listfn
61 | map f (LCONS(e, es)) = delay (fn () => LCONS(f e, map f es))
63 | map f x = delay (fn () => map f (force x))
68 | LCONS(e, es) => delay (fn () => case f e of
72 | x => delay (fn () => mapPartial f (force x))
77 | flatten (LCONS(e, es)) = delay (fn () => append e (flatten es))
79 | flatten x = delay (fn () => flatten (force x))
82 | bind (LCONS(e, es)) f = delay (fn () => append (f e) (flatten (map f es)))
84 | bind x f = delay (fn () => bind (force x) f)
99 | fromList (e::es) = delay (fn () => LCONS(e, fromList es))