import { Collector } from "../collector"; export function first () : Collector { return Collector.of( () => ( { value: null } ), ( state, item ) => state.value === null ? state.value = item : void 0, ( stateA, stateB ) => ( { value: stateA.value != null ? stateA.value : stateB.value } ), state => state.value ); }