import type { Fn } from "@thi.ng/api" ; import type { Transducer } from "./api.js" ; import { map } from "./map.js" ; param fn export const sideEffect = < T > ( fn ) : Transducer < T , T > => map ( ( x ) => ( fn ( x ) , x ) ) ;