Created
April 22, 2015 20:21
-
-
Save TheSeamau5/2baace7a1fe26176c539 to your computer and use it in GitHub Desktop.
Run tasks in Parallel in Elm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parallel : Address a -> List (Task error a) -> Task error (List ThreadID) | |
parallel address tasks = | |
let | |
sendToAddress task = spawn (task `andThen` send address) | |
in | |
sequence (List.map sendToAddress tasks) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment