Commits

camlspotter  committed 77aa335

added xlazy

  • Participants
  • Parent commits d0bb69b

Comments (0)

Files changed (2)

File lib/xlazy.ml

+open Lazy
+
+include (Monad.Make(struct
+  type 'a t = 'a Lazy.t
+
+  let return : 'a -> 'a t = lazy_from_val
+  let bind z f = f (force z)
+end) : Monad_intf.T with type 'a t := 'a Lazy.t)
+
+let (!!) = force

File lib/xlazy.mli

+include Monad_intf.T with type 'a t := 'a Lazy.t
+
+val (!!) : 'a lazy_t -> 'a
+(** Same as Lazy.force *)