RosettaCodeData/Task/Time-a-function/Elixir/time-a-function-2.elixir
2023-07-01 11:58:00 -04: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}