An async IO list is like a lazy list but instead of being unevaluated Thunk
s,
delayed
suffixes are Task
s being evaluated asynchronously. A delayed suffix can signal the end
of computation (successful or due to a failure) with a terminating value of type ε
.
- cons {ε : Type u} {α : Type v} (hd : α) (tl : AsyncList ε α) : AsyncList ε α
- delayed {ε : Type u} {α : Type v} (tl : Lean.Server.ServerTask (Except ε (AsyncList ε α))) : AsyncList ε α
- nil {ε : Type u} {α : Type v} : AsyncList ε α
Instances For
Equations
- IO.AsyncList.instInhabited = { default := IO.AsyncList.nil }
Instances For
Equations
- IO.AsyncList.instCoeList = { coe := IO.AsyncList.ofList }
Spawns a Task
returning the prefix of elements up to (including) the first element for which p
is true.
When p
is not true of any element, it returns the entire list.
Spawns a Task
waiting on all elements.
Equations
- IO.AsyncList.waitAll = IO.AsyncList.waitUntil fun (x : α) => false
Instances For
Spawns a Task
acting like List.find?
but which will wait for tail evaluation
when necessary to traverse the list. If the tail terminates before a matching element
is found, the task throws the terminating value.
Retrieve the already-computed prefix of the list. If computation has finished with an error, return it as well.
The returned boolean indicates whether the complete AsyncList
was returned, or whether only a
proper prefix was returned.
Equations
- One or more equations did not get rendered due to their size.