Concurrent computing: Difference between revisions

m
Updated whitespace and output to match task.
m (Removed output as specified by task, removed comments as language is clear enough.)
m (Updated whitespace and output to match task.)
Line 485:
=={{header|Elixir}}==
<lang Elixir>defmodule Concurrent do
def computing(xs) do
Enum.each (xs, fn x ->
spawn (fn ->
Process.sleep(:rand.uniform(1000))
IO.puts x
end)
end )
end
Process.sleep(1000)
end )
Process.sleep(1000)
end
end
Concurrent.computing ["EnjoyA", "RosettaB", "CodeC"]</lang>
Concurrent.computing ["Enjoy", "Rosetta", "Code"]</lang>
 
{{out}}
<pre>
Rosetta
Code
Enjoy
</pre>
 
=={{header|Erlang}}==