Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Async<'a> list -> Async<'a list>
- let sequence list =
- let rec loop l acc =
- async {
- match l with
- | [] ->
- return List.rev acc
- | h::t ->
- let! h' = h
- return! loop t (h'::acc)
- }
- loop list []
- let sequenceList list =
- List.foldBack (map2 cons) list (retn [])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement