recursion, induction corrected and completed; should improve foldin esp wrt types