Description:
Filters out <list> (a list of lists) using the predicate <test>.
<test> may be a function name (a symbol) or it may be a visual function or patch in 'lambda' mode.
The predicate <test> is applied to the element of rank <numcol> in every sublist in <list> and filters the whome sublists.
<numcol> counts from 0.
<mode> 'reject' means reject elements whose <numcol>th element verifies <test>.
<mode>'pass' means retain only elements whose <numcol>th element verifies <test>.
Ex. (table-filter 'oddp '((1 2 3) (4 5 6) (7 8 9)) 1 'pass) --> ((4 5 6)) [keeps lists which first element is odd]
Ex. (table-filter 'oddp '((1 2 3) (4 5 6) (7 8 9)) 1 'reject) --> ((1 2 3) (7 8 9)) [rejects lists which first element is odd]
|