Skip to content

Instantly share code, notes, and snippets.

@jb55
Created August 17, 2010 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jb55/528381 to your computer and use it in GitHub Desktop.
Save jb55/528381 to your computer and use it in GitHub Desktop.
template <class TFunc>
auto map(const TFunc &f) -> FList<decltype(f(_Ty()))>*
{
auto temp = new FList<decltype(f(_Ty()))>();
for (auto i = begin(); i != end(); i++)
temp->push_back(f(*i));
return temp;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment