| Slide 16 : 26 |
A similar table example
Switching the first two columns of the table
(define row list) (define cell list)
(define (col-switch row-lst)
(cons (second row-lst)
(cons (first row-lst) (cddr row-lst))))
(define sample-table
(list
(row "This" "is" "row" "1")
(row "This" "is" "row" "2")
(row "This" "is" "row" "3")
(row "This" "is" "row" "4")))
(write-html '(pp prolog)
(html
(head
(title "Table Examples"))
(body
(table 'border "1" (map (compose tr (map td) col-switch) sample-table) )
))) 






