Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

list-keep returns list element(s) that meet condition.

Parameter Description
lst List to operate on
cnd Condition for a list item to be kept

Example

Example 1: Retrieve all values <=3 from a list

> (list-keep (list 7 1 8 2 9 3 2 5) (lambda (l) (<= l 3)))
(1 2 3 2)
Clone this wiki locally