The :filtered
list operator is already powerful. However lists can be taken to the next level with three extensions:
- Inside of the
:filtered
operator in addition to thethis [type]
of the inspected item add athis index
that contains the current index of the item being inspected. This would allow cross-referenced filtering with respect to other lists. - Add a
:items #
operator on lists that takes a list of Cartesian indexes (numbers) and returns a list of length equal to the list of Cartesian indexes, containing the item of searched list at that index when found, and a null in that spot when not found. - Add a
:logicals
operator on lists that takes a list of logical indexes (booleans) and returns a list of length that is the minimum of the length of the two lists, only returning values from the searched list fortruths
in the logical index and completely omitting the value otherwise.