4 ms·
The way I think about it is the base case of a recursive function to evaluate the two. In order to preserve folding Boolean AND across a list your base case mus
by mlazos 7y ago
The way I think about it is the base case of a recursive function to evaluate the two. In order to preserve folding Boolean AND across a list your base case must be true. Folding Boolean OR across a list only works if your base case is false.
- xscott 7y agoFalse is the identity element for Or, similar to how Zero is the identity element for addition. True is the identity element for And, similar to how One is the identity element for multiplication.