Skip to content

Instantly share code, notes, and snippets.

@bmarcot
Created April 26, 2013 10:14
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 bmarcot/5466285 to your computer and use it in GitHub Desktop.
Save bmarcot/5466285 to your computer and use it in GitHub Desktop.
def mapFun[T, U](xs: List[T], f: T => U): List[U] = (xs foldRight List[U]())(f(_) :: _)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment