either

  1. CommonType!Ts either(Ts a)
    CommonType!Ts
    either
    (
    Ts...
    )
    (
    lazy Ts a
    )
    if (
    a.length >= 1
    )
  2. auto ref either(Ts a)

Return Value

Type: CommonType!Ts

First Argument (element of a) whose implicit conversion to bool is true.

Similar to behaviour of or operator in dynamic languages such as Lisp's (or a...) and Python's a or ....

TODO Is inout Conversion!T the correct return value?

NOTE: Lazy parameters are currently marked as throw which makes it impossible to mark either() as nothrow. Issue at https://issues.dlang.org/show_bug.cgi?id=12647

Meta