RosettaCodeData/Task/Time-a-function/Elixir/time-a-function-2.elixir
2015-11-18 06:14:39 +00:00

2 lines
91 B
Text

iex(11)> :timer.tc(fn x -> Enum.each(1..x, fn y -> y*y end) end, [1000000])
{2300000, :ok}