First version of FlatMap !!!
Partial function in flatmap somehow works
cleaned some code in FlatMapImpl