Play audio slide show -- Keyboard shortcut: 'x'  Lecture overview -- Keyboard shortcut: 'u'  Previous page: The mapping function -- Keyboard shortcut: 'p'  Next page: Filtering -- 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 10 : 34

Examples of mapping
Expresion

Value

(map 
  string?
  (list 1 'en "en" 2 'to "to"))
(#f #f #t #f #f #t)
(map 
   (lambda (x) (* 2 x))
   (list 10 20 30 40))
(20 40 60 80)
(ul
  (map 
   (compose li 
    (compose b 
     (lambda (x)
      (font-color red x))))
   (list "a" "b" "c")
  )
)
  • a
  • b
  • c
Same as above
<ul>
  <li>
   <b><font color = "#ff0000">a</font></b>
  </li>
  <li>
   <b><font color = "#ff0000">b</font></b>
  </li>
   <li>
    <b><font color = "#ff0000">c</font></b>
  </li>
</ul>