Run a side effect on a value inside a pipeline and pass the value through unchanged. Useful for logging, metrics, or assertions without breaking composition.
const result = pipe( loadUser(id), tap((user) => console.log("loaded", user.email)), (user) => user.name, ) Copy
const result = pipe( loadUser(id), tap((user) => console.log("loaded", user.email)), (user) => user.name, )
Run a side effect on a value inside a pipeline and pass the value through unchanged. Useful for logging, metrics, or assertions without breaking composition.