# Factorial in Elixir defmodule Factorial do def of(n) do case n do 0 -> 1 1 -> 1 n -> n * of(n - 1) end end end Enum.each(0..5, fn n -> IO.puts Factorial.of(n) end)
To embed this project on your website, copy the following code and paste it into your website's HTML: