Applies a function sideEffect to the input, then returns the input.
The primary use case for tap is debugging values in the middle of a
pipe or flow chain.
Example
import { pipe, tap } from"flurp"; import*asNfrom"flurp/number";
pipe( 5, N.multiply(2), tap(console.log), // prints 10 to the console, passes 10 on to the next function N.multiply(2) ); // 20
Applies a function
sideEffect
to the input, then returns the input. The primary use case fortap
is debugging values in the middle of a pipe or flow chain.Example