I'm trying to implement flatmap via generics. (Yes, flatmap is already a part of the language.) My attempt uses generic, overloaded functions to accomplish this. (Probably not the most efficient. I know. I've already got a working imperative version.) What I find unexpected is that I'm trying to implement flatmap via generics. (