IO operations using monadic lazy lists. #
Give a list of tasks, return the monadic lazy list which returns the values as they become available.
Equations
- MLList.ofTaskList tasks = MLList.fix?' (fun (t : List (Task α)) => if h : 0 < t.length then some <$> IO.waitAny' t h else pure none) tasks