every

  1. CommonType!T every(T a)
    CommonType!T
    every
    (
    T...
    )
    (
    lazy T a
    )
    if (
    T.length != 0
    )
  2. auto ref every(T a)

Return Value

Type: CommonType!T

last argument if all arguments implicitly bool-convert to true * otherwise CommonType!T.init. * * Similar to behaviour of and operator in dynamic languages such as of Lisp's * (and a...) and Python's a and ..... * * TODO: Is inout Conversion!T the correct return value?

Examples

assert(every(3) == 3);
assert(every(3, 4) == 4);
assert(every(0, 4) == 0);
assert(every(0, 0) == 0);
assert(every([0, 1], [1, 2]) == [1, 2]);
assert(every([0, 1], [1]) == [1]);
assert(every(`a`, `b`) == `b`);
assert(every(``, `b`) == `b`);
assert(every(cast(string)null, `b`) == cast(string)null);

Meta