This is a main function, ifAnyOf, and a suite of demo predicate LAMBDAs to facilitate building include statements for FILTER (and other uses). Trying to come at this from a functional programming perspective, I'm basically attempting to build a liftable OR function that can be implemented with helper predicates to read like an English sentence like this: ifAnyOf <column> hasProperty(x). The predicate LAMBDA in this hypothetical example builds a conditional on its parameter x, then returns a LAMBDA that will take <column> as it's parameter.
Examples to follow.
Excel Formula:
=LAMBDA(col_array,preds,
REDUCE(
FALSE,
preds,
LAMBDA(acc,pred,
(acc)+pred(col_array)
)
)
)
Examples to follow.
Last edited by a moderator:
Upvote
2