Logical aggregation functions

Does Julia have logical aggregation functions ?
Something like

AND( [true, true, false] ) = false
OR( [true, true, false] ) = true

all and any

2 Likes

For general aggregates, you can use the reduce function, which can work with any arbitrary two-argument functions. In this case, all and any implementations are likely faster due to the ability to short circuit the evaluation.

1 Like