strom/samples/flatMap.js

7 lines
175 B
JavaScript
Raw Normal View History

2018-12-03 05:38:17 +00:00
const Mhysa = require("mhysa");
Mhysa.fromArray(["a", "AA"])
.pipe(Mhysa.flatMap(s => new Array(s.length).fill(s)))
.pipe(Mhysa.join(","))
.pipe(process.stdout);