With Scalaz 6 at least, no - not if the function has a return type that is different from (and not a subtype of) its argument type, because EnumeratorM
's type doesn't allow it to change the input type of the iteratee.
However, it is possible to "pre-compose" arbitrary functions with an iteratee, so I think this is the way to go. Could also maybe use an enumeratee, but this abstraction is not provided in Scalaz 6.