https://github.com/alexeyraspopov/transducers
Transducers for JavaScript
https://github.com/alexeyraspopov/transducers
Last synced: 7 days ago
JSON representation
Transducers for JavaScript
- Host: GitHub
- URL: https://github.com/alexeyraspopov/transducers
- Owner: alexeyraspopov
- Created: 2015-09-04T15:06:22.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-09-05T19:04:53.000Z (about 10 years ago)
- Last Synced: 2025-09-24T10:49:17.135Z (24 days ago)
- Language: JavaScript
- Size: 98.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Transducers
Transducers for JavaScript.
## Usage
```
function inc (x) { return x + 1 }function plus(x, y) { return x + y }
function odd(x) { return !!(x % 2) }
var chain = comp( map(inc), filter(odd) );
transduce(chain, plus, 0, [0, 1, 2, 3, 4, 5, 6])
// 16
```