Lecture overview -- Keyboard shortcut: 'u'  Previous page: Working with higher-order functions in LAML [Section] -- Keyboard shortcut: 'p'  Next page: Combination of mirror functions: Tables (2) -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  Annotated slide -- Keyboard shortcut: 't'  Alphabetic index  Help page about these notes  Course home    Slide 15 : 26

Combination of mirror functions: Tables (1)
An idiomatic table presentation pattern in LAML
(load (string-append laml-dir "laml.scm"))
(laml-style "simple-xhtml1.0-transitional-validating")

(define map (curry-generalized map))
(define row list)

(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)) sample-table) )
  )
 )
)

(end-laml)