import { isIterable } from "@thi.ng/checks/is-iterable" ; import type { Transducer } from "./api.js" ; import { iterator1 } from "./iterator.js" ; import { map } from "./map.js" ; example param key export function pluck < A , B > ( key ) ; export function pluck < A , B > ( key , src ) ; export function pluck < A > ( key , src ? ) { return isIterable ( src ) ? iterator1 ( pluck ( key ) , src ) : map ( ( x ) => x [ key ] ) ; }