![]()
I think this is supposed to return false. (I think the blank parameters are being registered as true parameters instead of false parameters)
![]()
I think this is supposed to return false. (I think the blank parameters are being registered as true parameters instead of false parameters)
I mean, you’re not exactly supposed to do this, but I’m guessing it simply skips any empty slots and the default value is true. E.g:
let bools = [null, null] // assuming empty slot is null
let out = true;
bools.forEach(val => {
if (!isNill(val) && !val) {
out = false;
}
}
return out.
I think AND and OR with empty inputs report their identity element (the value ID such that X AND/OR ID = X for all X). In a perfect world, multiplication with empty inputs would report 1, but that would break too many old projects.
I think you’re thinking that empty slots should mean 0, but numbers aren’t in the domain of the Boolean operators; it’s kind of an accident that 0 often works as False.
But an or with empty inputs returns false, so I don’t know why not the same for the and command
False is the identity for OR: X OR False = X
But True is the identity for AND: X AND True = X
thats’ kinda weird, but i guess it makes sense. if a slot is empty, it shouldnt effect the other slots in the expression, right?
Yeah, exactly.