Play audio slide show -- Keyboard shortcut: 'x'  Lecture overview -- Keyboard shortcut: 'u'  Previous page: Tables with higher-order functions -- Keyboard shortcut: 'p'  Next page: The function simple-html-table -- 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 31 : 34

HTML element modifications
The idea behind the function modify-element is to perform an a priori binding of some attributes and some of the contents of a mirror function.
interesting-stuff.scm
The function modify-element.
Expression

Value

(define td1 
 (modify-element td 
  'bgcolor (rgb-color-list red)
  'width 50))

(table 'border 5 
  (map (compose tr (gmap td1)) rows))
This is first row
This is second row
This is third row
This is fourth row
(define ol1 
  (modify-element ol 'type "A"))

(ol1 
 (map
   (compose li as-string)
   (number-interval 1 10)))
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
(define ul1 
  (modify-element ul 'type "square"))

(ul1 
 (map
  (compose li as-string)
  (number-interval 1 10)))
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10