RosettaCodeData/Task/Time-a-function/Elixir/time-a-function-2.ex
2024-10-16 18:07:41 -07:00

2 lines
91 B
Elixir

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