Added some tests

Also fixed xProd. Tests for xProd, unzipWith, unzip and is.
This commit is contained in:
Angelos Chalaris
2018-01-24 17:17:51 +02:00
parent 16b0701084
commit 449dfdea1c
7 changed files with 51 additions and 12 deletions

View File

@ -1,2 +1,2 @@
const xProd = (a, b) => a.map(x => b.map(y => [x, y]));
const xProd = (a, b) => a.reduce((acc,x) => acc.concat(b.map(y => [x, y])),[]);
module.exports = xProd