Last active
April 24, 2019 09:18
-
-
Save PragTob/36aae079055dfcc2af523f8644f0b018 to your computer and use it in GitHub Desktop.
Simple elxir task
This file contains hidden or 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
| pick_up_task = Task.async(fn -> geocode(pick_up_address) end) | |
| drop_off_task = Task.async(fn -> geocode(drop_off_address) end) | |
| geocoded_addresses = Enum.map([pick_up_task, drop_off_task], fn task -> Task.await(task) end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment