Make MSeq.delay and MRand.delay lazy

This avoids `Stack_overflow`s that otherwise occur when the behavior
is only partially implemented.
This commit is contained in:
Neven Villani
2024-01-15 20:13:52 +01:00
committed by Neven Villani
parent bb1ec74794
commit 56b91df9d5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ let bind (sa : 'a t) (f : 'a -> 'b t) : 'b t =
Utils.not_yet "MRand.bind" (sa, f) Utils.not_yet "MRand.bind" (sa, f)
let delay (f : unit -> 'a t) : 'a t = let delay (f : unit -> 'a t) : 'a t =
Utils.not_yet "MRand.delay" (f ()) Utils.not_yet "MRand.delay" f
let sum (li : 'a t list) : 'a t = let sum (li : 'a t list) : 'a t =
Utils.not_yet "MRand.sum" li Utils.not_yet "MRand.sum" li
+1 -1
View File
@@ -10,7 +10,7 @@ let bind (sa : 'a t) (f : 'a -> 'b t) : 'b t =
Utils.not_yet "MSeq.bind" (sa, f) Utils.not_yet "MSeq.bind" (sa, f)
let delay (f : unit -> 'a t) : 'a t = let delay (f : unit -> 'a t) : 'a t =
Utils.not_yet "MSeq.delay" (f ()) Utils.not_yet "MSeq.delay" f
let sum (li : 'a t list) : 'a t = let sum (li : 'a t list) : 'a t =
Utils.not_yet "MSeq.sum" li Utils.not_yet "MSeq.sum" li