Final generalization of PlatMap
Fixed context not correctly being applied.
Merge commit 'c9abf7bf2643d4c4aaad4f8f775271f979becb1d'