I remember the class of professor Ismar Frango, back in 2012 on Paradigms of programming. It was mind blowing to think recursively but to implement in C or C++ it was a bit tough. Nowadays, with python and elixir, dude! it’s much easier.
I started learning Elixir some time back, when I make a mistake in one of my python programs and Elixir came with “end” in function. It was like, well, this is a broken python. But not, it’s much more than that.
To learn I use this blog  and this tutorial  It’s from there that I stole the code below. Elixir is very powerful for pattern matching .
defmodule Recursion do def print_multiple_times(msg, n) when n <= 1 do IO.puts msg end def print_multiple_times(msg, n) do IO.puts msg print_multiple_times(msg, n - 1) end end Recursion.print_multiple_times("Hello!", 3)