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 17:38:07 +00:00 committed by Neven Villani
parent bb1ec74794
commit 56b91df9d5
No known key found for this signature in database
GPG Key ID: 00E765FA7F4F2EDE
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ let bind (sa : 'a t) (f : 'a -> 'b t) : 'b t =
Utils.not_yet "MRand.bind" (sa, f)
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 =
Utils.not_yet "MRand.sum" li

View File

@ -10,7 +10,7 @@ let bind (sa : 'a t) (f : 'a -> 'b t) : 'b t =
Utils.not_yet "MSeq.bind" (sa, f)
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 =
Utils.not_yet "MSeq.sum" li