Use parens around spawn calls
This commit is contained in:
@@ -59,7 +59,7 @@ defmodule Processes do
|
|||||||
end
|
end
|
||||||
|
|
||||||
koan "Use tail recursion to receive multiple messages" do
|
koan "Use tail recursion to receive multiple messages" do
|
||||||
pid = spawn &yelling_echo_loop/0
|
pid = spawn(&yelling_echo_loop/0)
|
||||||
|
|
||||||
send pid, {self, "o"}
|
send pid, {self, "o"}
|
||||||
assert_receive ___
|
assert_receive ___
|
||||||
@@ -82,9 +82,9 @@ defmodule Processes do
|
|||||||
|
|
||||||
koan "Processes can be used to hold state" do
|
koan "Processes can be used to hold state" do
|
||||||
initial_state = "foo"
|
initial_state = "foo"
|
||||||
pid = spawn fn ->
|
pid = spawn(fn ->
|
||||||
state(initial_state)
|
state(initial_state)
|
||||||
end
|
end)
|
||||||
|
|
||||||
send pid, {self, :get}
|
send pid, {self, :get}
|
||||||
assert_receive ___
|
assert_receive ___
|
||||||
|
|||||||
Reference in New Issue
Block a user