Play audio slide show -- Keyboard shortcut: 'x'  Lecture overview -- Keyboard shortcut: 'u'  Previous page: The filtering function -- Keyboard shortcut: 'p'  Next page: Reduction and zipping [Section] -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Alphabetic index  Help page about these notes  Course home      Higher-order Functions - slide 13 : 34

Examples of filtering
Expression

Value

(filter 
  even?
 '(1 2 3 4 5))
(2 4)
(filter 
  (negate even?)
  '(1 2 3 4 5))
(1 3 5)
(ol 
 (map li
  (filter string?
   (list 
     1 'a "First" "Second" 3))))
  1. First
  2. Second
Same as above
<ol>
  <li>First</li> <li>Second</li>
</ol>