Maxima Function
subset (a, f)
Returns the subset of the set a that satisfies the predicate f.
subset
returns a set which comprises the elements of a
for which f returns anything other than false
.
subset
does not apply is
to the return value of f.
subset
complains if a is not a literal set.
Examples:
(%i1) subset ({1, 2, x, x + y, z, x + y + z}, atom); (%o1) {1, 2, x, z} (%i2) subset ({1, 2, 7, 8, 9, 14}, evenp); (%o2) {2, 8, 14}