functionalscript
Advanced tools
Comparing version 0.0.162 to 0.0.163
@@ -93,2 +93,4 @@ const { todo } = require('../../dev') | ||
const join = pipe(mapReduce.join)(apply) | ||
module.exports = { | ||
@@ -110,2 +112,4 @@ /** @readonly */ | ||
/** @readonly */ | ||
join, | ||
/** @readonly */ | ||
exclusiveScan, | ||
@@ -112,0 +116,0 @@ /** @readonly */ |
@@ -16,2 +16,15 @@ const { pipe } = require('../func') | ||
const sum = apply(mr.sum) | ||
const join = pipe(mr.join)(apply) | ||
/** @type {<T, R>(f: (value: T) => R) => (c: Iterable<T>) => Iterable<R>} */ | ||
const map = f => c => ({ | ||
*[Symbol.iterator]() { | ||
for (const i of c) { | ||
yield f(i) | ||
} | ||
} | ||
}) | ||
module.exports = { | ||
@@ -25,18 +38,9 @@ /** @readonly */ | ||
/** @readonly */ | ||
join: pipe(mr.join)(apply), | ||
join, | ||
/** @readonly */ | ||
sum: apply(mr.sum), | ||
sum, | ||
/** | ||
* @readonly | ||
* @type {<T, R>(f: (value: T) => R) => (c: Iterable<T>) => Iterable<R>} | ||
*/ | ||
map: f => c => ({ | ||
*[Symbol.iterator]() { | ||
for (const i of c) { | ||
yield f(i) | ||
} | ||
} | ||
}), | ||
/** @readonly */ | ||
map, | ||
@@ -43,0 +47,0 @@ /** |
{ | ||
"name": "functionalscript", | ||
"version": "0.0.162", | ||
"version": "0.0.163", | ||
"description": "FunctionalScript is a functional subset of JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
75915
1307