Assignment 2 - Sisi Cheng/Jean Sung

A non-recursion solution might have been cleaner, using map/filter/etc.