What are you struggling with when trying to skip elements?
> Is it bad to use map?
No.
> Is it bad to use map?
No.
flatMap takes care of a lot of that
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...