| Object-oriented programming in Scheme - slide 4 : 11 |
| Expression | Value |
(define document
(let
((html
(xml-modify-element html
'xmlns "http://www.w3.org/1999/xhtml"))
(body
(xml-modify-element body
'bgcolor (rgb-color-encoding 255 0 0)))
)
(lambda (ttl bdy)
(html
(head (title ttl))
(body bdy))))) | |
(document "A title" "A body") | <html xmlns =
"http://www.w3.org/1999/xhtml">
<head>
<title>A title</title>
</head>
<body bgcolor = "#ff0000">
A body
</body>
</html> |