Another drop-off of FPIS exercises
Kinda tough exercise #29 from FPIS

Implement tree catamorphism