I thought that a lambda function defined for scalar input values would automatically iterate through an array when faced with an array input, but it seems that it's not universally true. I want to understand why, because I'm not happy with the definition I ended up with to make it work.
There is a range of values and I want to test each cell for multiple conditions. E.g. check whether an integer values is greater than min and less then max.
Using the AND function I ended up with the following lambda:
=LAMBDA(x;AND(x>2;x<10))
however, this definition won't work when used as an array function, only when applied on each individual cell separately.
I have tried a different approach and defined the lambda purely as a numerical expression:
=LAMBDA(x;(x>2)*(x<10)=1)
this definition works on an array, but I find it generally less readable.
Why does the definition with AND not work?