Completed Hailstone function with recursion! Finished revision for hw1