2 years ago

#58444

test-img

Rax Adaam

(wx)Maxima: predicate test for nested lists in arrays

I have an array of arrays of lists allvals and would like to check to see if any of the allvals[i][j] are empty.

The following works, but isn't easy to read: I thought the following worked, but I don't think it actually does...

some(lambda([anarrays], some( lambda([alist], some(lambda([e], e = true), alist) = true), anarrays ) = true), allvals)

Is there a better approach? I tried playing with map and apply but that was even worse, for me.

Any suggestions for a better workflow would be greatly appreciated.

EDIT: the following does work:

map(lambda([anarray], apply('some, [emptyp, anarray])), allvals);

arrays

predicate

maxima

wxmaxima

0 Answers

Your Answer

Accepted video resources