plainfp - v0.1.0
    Preparing search index...

    Function any

    • Return the first successful result. If every input fails, collect all errors into an array.

      Type Parameters

      • T
      • E

      Parameters

      Returns ResultType<T, E[]>

      const charged = any([chargeCard(order), chargePaypal(order), chargeBank(order)])
      // ok(receipt) on first success, or err([e1, e2, e3])