This is the Task 1 from the Perl Weekly Challenge Week 17. You have to implement the so-called Ackermann function.
This is an interesting function that is defined kind of recursively but actually this is not a recursion, as the recurrent formula is using the function as an argument of itself.