• Executes a logical expression mapping tokens with a predicate, using the result as operands.

    Logical operators currently supported: | for OR and & for AND. Operands between operators will be tokenized via tokenizeWords.

    Type Parameters

    • T

    Parameters

    • expr: string

      The expression of tokens and operators.

    • predicate: ((tokens: readonly string[]) => Maybe<T>)

      Each token set operand will be mapped using this function.

        • (tokens): Maybe<T>
        • Parameters

          • tokens: readonly string[]

          Returns Maybe<T>

    Returns T | null