Fix + test for functions as part of monad bind