reduce: Require initialValue in functional interface.

This commit is contained in:
David Braun 2017-11-28 11:39:37 -05:00
parent 366249f84f
commit 1fc2308f08
No known key found for this signature in database
GPG key ID: 5694EEC4D129BDCF
2 changed files with 8 additions and 1 deletions

View file

@ -176,6 +176,8 @@ describe(`functional interface`, async function() {
});
it(`double argument application`, async function() {
assert.equal(await Channel.reduce(Math.max, 10, Channel.of(0, 1, 2)), 10);
assert.deepEqual(
await Channel.slice(1, 4)(Channel.of(0, 1, 2, 3, 4)).values(),
[1, 2, 3]