Function filterTransducer

Creates a transducer that filters values based on a predicate function.

  • Type Parameters

    • T

      The type of elements.

    Parameters

    • predicate: ((x: T) => boolean)

      Function to determine if a value should be kept.

        • (x): boolean
        • Parameters

          Returns boolean

    Returns Transducer<T, T>

    • A transducer that filters elements.