| Linguistic abstraction - slide 22 : 22 |
| Expression | Value |
(let* ((ttl "My Document")
(bdy (list 'p "A paragraph"))
(doc
(list 'html
(list 'head
(list 'title ttl))
(list 'body bdy)))
)
(render (eval doc))) | <html> <head> <title>My Document</title> </head> <body> <p>A paragraph</p> </body> </html> |
(let* ((ttl "My Document")
(bdy (list 'p "A paragraph"))
(doc
`(html
(head (title ,ttl))
(body ,bdy))))
(render (eval doc))) | <html> <head> <title>My Document</title> </head> <body> <p>A paragraph</p> </body> </html> |
(+ 1 2 3 4) | 10 |
(+ (list 1 2 3 4)) | Error: + expects argument of type number; given (1 2 3 4) |
(apply + (list 1 2 3 4)) | 10 |