We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c66fc97 + b4a3139 commit c1164a7Copy full SHA for c1164a7
solutions/elixir/factorial.ex
@@ -0,0 +1,3 @@
1
+defmodule Factorial do
2
+ def factorial(n), do: Enum.reduce(1..n, &(&1 * &2))
3
+end
0 commit comments