Skip to content

Instantly share code, notes, and snippets.

@thetristan
Created July 11, 2013 18:49
Show Gist options
  • Save thetristan/5978118 to your computer and use it in GitHub Desktop.
Save thetristan/5978118 to your computer and use it in GitHub Desktop.
Multimap
isFn = (fn) -> typeof fn is 'function'
multiMap = (coll, [fn, fns...]...) ->
return coll unless isFn fn
multiMap map(coll, fn), fns...
# Usage:
# multiMap myCollection, fn1, fn2, fn3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment