In C++ foldr is pronounced std::accumulate and map is pronounced std::transform.
I don't think we have a word for unfold, but I guess I'd say it like this:
template<class OutIt, class P, class F, class G, class T> size_t unfold(OutIt result, P stop, F f, G g, T x) { if (stop(x)) return 0; *result = f(x); return 1 + unfold(++result, stop, f, g, g(x)); }
Edit: hmm, no I wouldn't, it's unspecified whether g or g(x) gets evaluated first, which matters if G is stateful (which it shouldn't be, but have ever tried telling a C++ programmer they shouldn't use a sharp object?) A workaround would be to pass stateful functors in by reference, e.g. using a reference wrapper such as boost::ref or std::ref but it'd be nice if that wasn't needed. I'll have to think about that further ...