Partial support for function map (does not work well with functors).