Skip to content

Instantly share code, notes, and snippets.

@TheSeamau5
Created April 22, 2015 20:21
Show Gist options
  • Save TheSeamau5/2baace7a1fe26176c539 to your computer and use it in GitHub Desktop.
Save TheSeamau5/2baace7a1fe26176c539 to your computer and use it in GitHub Desktop.
Run tasks in Parallel in Elm
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