allTrueQ

Gives true, if all elements in a vector of Booleans are true

Information

This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.

The function takes a vector of Booleans and will return true, if all of the elements in the input vector is true, and false otherwise.

Syntax


Functions.allTrueQ(vec);

Examples


Functions.allTrueQ({false, false, false}); // false
Functions.allTrueQ({true, true, true}); // true
Functions.allTrueQ({false, false, true}); // false

See also

Functions.noneTrueQ

Syntax

y = allTrueQ(x)

Inputs (1)

x

Type: Boolean[:]

Description: Vector of booleans

Outputs (1)

y

Type: Boolean

Description: True, if all elements of the input vector are true

Revisions

  • Changed to shortcircuit evaluation and added inline = true in v2.2.