Using `Effect.tap` and `Effect.map` for Side Effects and Mapping in TypeScript

Just getting my head around common patterns, the API surface, etc.
The following works great and I'm enjoying the compositional nature of Effect a LOT.
.pipe(Effect.timed)
.pipe(Effect.tap(([timing]) =>console.log('timing',timing.pipe(Duration.toSeconds))))
.pipe(Effect.map(([, response]) => response))

It's also conceptually what I want: "tap to log the time as a side effect, but then return the thing I actually care about"
Technically I could just console.log inside of the map and then return the response, but the tap->map feels like a better honest description of intent

All that said, is there any other preferred or just common alternative way to do this? Would some kind of
zip
function be a good candidate here? Just seems like the kind of thing that is commonplace so others have encountered this.

Thanks for any insight!
Was this page helpful?