Referente ao curso Elixir: Sintaxe, Programação funcional e Pattern Matching, no capítulo Controle de fluxo e atividade Recursão
defmodule Tabuada do def tabuada(n) do tabuada(n, 10, []) end defp tabuada(_, 0, list), do: list defp tabuada(n, m, list) do tabuada(n, m-1, [(n*m)|list]) end end
Aproveite o aniversário da Alura
e comece sua jornada tech
Por tempo limitado
Olá, Matheus!
Muito bom