kalidasm
1/7/2020 - 3:12 PM

js-transducers-snippets

const doubleTheNumber = (number) => number * 2;
const increaseNumberByTen = (number) => number + 10;
const payload = [2,4,6,8,10,12,14];
const result = payload.map(doubleTheNumber)
                      .map(increaseNumberByTen);