Avoiding Repetitious Boolean Formulas

Frequently a boolean function starts with a relatively complex evaluation. Then if the result meets some expectation, the whole evaluation is run again.

For instance,

?(arrayfilter(relatedarray(…)) ≠ “”,arrayfilter(relatedarray(…)),"")

In a procedure I can simply run it once and load the result into a variable, then use the variable in my function. But when used in a situation requiring the whole thing to be a single formula it seems there must be some way to apply it without repeating:

?(arrayfilter(relatedarray(…)) ≠ “”,(UseIt),"")

Maybe something like this exists and I’ve overlooked it. Or perhaps there’s another way.

Check out the cache( and assign( functions.

I haven’t tried it yet but cache( may be just what I’m looking for. Thanks.