devinargenta / effectMap

chain "forEach" and get the input back

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

do not tell me i cannot chain forEach

const log = v => console.log(v)

const f = [1,2,3].map(n => n*2).effectMap(log)

console.log(f)
2
4
6
[ 2, 4, 6 ]

About

chain "forEach" and get the input back


Languages

Language:JavaScript 100.0%