Demonstrates equivalent imperative, fold, and tail recursive loops