RosettaCodeData/Task/Time-a-function/Elixir/time-a-function-2.elixir

3 lines
91 B
Text
Raw Permalink Normal View History

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