Pacote

    Function filter

    • Returns None if the option is None, otherwise calls predicate with the wrapped value and conditionally returns the option or None.

      Type Parameters

      • T

      Parameters

      • fn: (value: T) => boolean

        Predicate.

      • option: Option<T>

        Option to evaluate.

      Returns Option<T>

      Some<T> if the predicate returns true, or None if the predicate returns false.

    MMNEPVFCICPMFPCPTTAAATR