recursion with or without tail-call optimization/loop macro