Skip to content

Instantly share code, notes, and snippets.

@Raynos
Created April 21, 2014 23:34
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/b30f65c86150dd30ae25 to your computer and use it in GitHub Desktop.
Save Raynos/b30f65c86150dd30ae25 to your computer and use it in GitHub Desktop.
var json = map(src, JSON.parse)
function map(channel, lambda) {
return {
input: {
take: function() {
return channel.input.take()
.then(lambda)
}
},
output: channel.output
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment