Implemented missing functions in recursion.py