(load (string-append laml-dir "laml.scm"))
(laml-style "simple-xhtml1.0-transitional-validating")
(define laml-generation-meta (meta 'name "Generator" 'content "LAML"))
(define meta-props (list 'http-equiv "Content-Type" 'content "text/html; charset=iso-8859-1"))
(define html-props (list 'xmlns "http://www.w3.org/1999/xhtml"))
(set-xml-accept-extended-contents-in 'xhtml10-transitional #t)
(set-xml-accept-only-string-valued-attributes-in 'xhtml10-transitional #f)
(define ttl "HTML Fac Example")
(define map (curry-generalized map))
(define (fac n) (if (= n 0) 1 (* n (fac (- n 1)))))
(write-html '(pp prolog)
(html html-props
(head
(meta meta-props) laml-generation-meta
(title ttl))
(body
(h1 ttl)
(table 'border 1
(map (compose tr (map td))
(map (lambda (n)
(list n (fac n)))
(number-interval 1 30))))
)
)
)
(end-laml) |