Skip to content

Instantly share code, notes, and snippets.

@Raynos
Created September 15, 2012 13:29
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 Raynos/3727882 to your computer and use it in GitHub Desktop.
Save Raynos/3727882 to your computer and use it in GitHub Desktop.
function expand(stream, iterator) {
return flatten(map(stream, iterator))
}
function forEach(stream, iterator) {
return stream.pipe(to(iterator))
}
function prop(name) {
return function (item) { return item[name] }
}
function method(name) {
return function (item) { return item[name]() }
}
function isTruthy(v) {
return !!v
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment