potential bugfix for Enum.to_rev_list

This commit is contained in:
Simon Cruanes 2013-03-19 00:35:54 +01:00
parent a3c7b70e53
commit 101fc8a01e

View file

@ -170,7 +170,7 @@ let to_list enum =
let to_rev_list enum = let to_rev_list enum =
let rec fold acc gen = let rec fold acc gen =
let acc', stop = let acc', stop =
try gen () :: acc, true try let x = gen () in x :: acc, true
with EOG -> acc, false with EOG -> acc, false
in if stop then acc' else fold acc' gen in if stop then acc' else fold acc' gen
in in