by yakshaving_jgt · 4y ago · 0 comments
For posterity (and forgive me if this JavaScript syntax is inaccurate; I don't write it so much these days)…
xs.map(a => shouldBeSkipped ? a : f(a))Btw, I'm assuming that the original map questioner wasn't solely using flatMap for side-effectful iteration, which reading again, I'm a bit suspicious about.
1: https://gcanti.github.io/fp-ts/modules/Array.ts.html#filterm...