aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/future.ml
diff options
context:
space:
mode:
authorGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2017-03-05 17:30:03 +0100
committerGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2017-03-14 11:31:19 +0100
commit3502cc7c3bbad154dbfe76558d411d2c76109668 (patch)
tree7f336710bcf2d6399d7391a133acf57c9542ef0c /lib/future.ml
parentecacc9af6100f76e95acc24e777026bfc9c4d921 (diff)
[future] Remove unused parameter greedy.
It was always set to `greedy:true`.
Diffstat (limited to 'lib/future.ml')
-rw-r--r--lib/future.ml14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/future.ml b/lib/future.ml
index ea0382a63..b60b32bb6 100644
--- a/lib/future.ml
+++ b/lib/future.ml
@@ -191,9 +191,9 @@ let transactify f x =
let purify_future f x = if is_over x then f x else purify f x
let compute x = purify_future (compute ~pure:false) x
let force ~pure x = purify_future (force ~pure) x
-let chain ?(greedy=true) ~pure x f =
+let chain ~pure x f =
let y = chain ~pure x f in
- if is_over x && greedy then ignore(force ~pure y);
+ if is_over x then ignore(force ~pure y);
y
let force x = force ~pure:false x
@@ -204,13 +204,13 @@ let join kx =
let sink kx = if is_val kx then ignore(join kx)
-let split2 ?greedy x =
- chain ?greedy ~pure:true x (fun x -> fst x),
- chain ?greedy ~pure:true x (fun x -> snd x)
+let split2 x =
+ chain ~pure:true x (fun x -> fst x),
+ chain ~pure:true x (fun x -> snd x)
-let map2 ?greedy f x l =
+let map2 f x l =
CList.map_i (fun i y ->
- let xi = chain ?greedy ~pure:true x (fun x ->
+ let xi = chain ~pure:true x (fun x ->
try List.nth x i
with Failure _ | Invalid_argument _ ->
CErrors.anomaly (Pp.str "Future.map2 length mismatch")) in