From d8001da79909734d333de31079ca2f4d884a6b21 Mon Sep 17 00:00:00 2001 From: "chris@chriszimmerman.net" Date: Thu, 15 Oct 2015 20:59:18 -0400 Subject: Added an alternative way to fire up a process in Elixir. --- elixir.html.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/elixir.html.markdown b/elixir.html.markdown index c8599838..9fdf37e9 100644 --- a/elixir.html.markdown +++ b/elixir.html.markdown @@ -384,6 +384,8 @@ end # Compile the module and create a process that evaluates `area_loop` in the shell pid = spawn(fn -> Geometry.area_loop() end) #=> #PID<0.40.0> +#Alternatively +pid = spawn(Geometry, :area_loop, []) # Send a message to `pid` that will match a pattern in the receive statement send pid, {:rectangle, 2, 3} -- cgit v1.2.3