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.
1 parent c66fc97 commit b4a3139Copy full SHA for b4a3139
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