Optional Argument Chaining

Hi all,

We probably don't need additional syntax to achieve this. I just wrote a library which allows you to `(pass?.aLongOptionalChaining()?.to ?< aFunctionTakingNonOptionalValues(:))?.ThenDoSomethingElse()` with `?>` operator.

The multiple parameters example:

(john.address, alice.address, 2.0) ?> getPostageEstimate(source:destination:weight:)

// Equivalent to

john.address.flatMap { freshVar1 in
  alice.address.flatMap { freshVar2 in
    getPostageEstimate(source: freshVar1, destination: freshVar2, weight: 2.0)
  }
}

See more about the library: GitHub - ddddxxx/Pipeline: Syntactic sugar for Swift optional chaining.

···

--
Xander