Invokes a callback for each element in the source.
Type of items in the source.
Callback function to invoke for each element.
Operation that invokes a callback for each element in the source.
const result = tap<number>((x) => console.log(x))([1, 2, 3]);// Logs:// 1// 2// 3console.log([...result]); // [1, 2, 3] Copy
const result = tap<number>((x) => console.log(x))([1, 2, 3]);// Logs:// 1// 2// 3console.log([...result]); // [1, 2, 3]
Invokes a callback for each element in the source.