I'm wondering if there is a functional way to apply an action to every element of list, in Maxima, without necessarily looping over the list?
e.g. if I would like to remove every element of the list a:[1,2,3]
from the list b:[5,4,3,2,1]
. Obviously, something like:
f(a,b):=
block(
[aList:a, newList:b],
for k thru length(aList)
do newList: delete(aList[k],newList)
);
I just wondered if there was a more direct way? I thought apply
might work, but couldn't figure it out, as it seems to take the whole list as the argument (vs. list elements).