whitespace

This commit is contained in:
Jay Hayes
2016-05-04 19:41:07 -05:00
parent f5af10d87a
commit a2060d6e5b

View File

@@ -37,12 +37,12 @@ defmodule Tasks do
end end
koan "You can yield to multiple tasks at once and extract the results" do koan "You can yield to multiple tasks at once and extract the results" do
squares = [1 ,2 ,3 ,4] squares = [1 ,2 ,3 ,4]
|> Enum.map(fn(number) -> Task.async(fn -> number * number end) end) |> Enum.map(fn(number) -> Task.async(fn -> number * number end) end)
|> Task.yield_many(100) |> Task.yield_many(100)
|> Enum.map(fn({_task,{:ok, result}}) -> result end) |> Enum.map(fn({_task,{:ok, result}}) -> result end)
assert squares == ___ assert squares == ___
end end
def do_other_stuff do def do_other_stuff do