Expression | Value | (let* ((functions
(map generate-double-tag-function
(list "table" "td" "tr")))
(table (car functions))
(td (cadr functions))
(tr (caddr functions)))
(table
(string-append
(tr
(map-concat td (list "c1" "c2" "c3"))
'bgcolor "#ff0000")
(tr
(map-concat td (list "c4" "c5" "c6")))
(tr
(map-concat td (list "c7" "c8" "c9"))))
'border 3)) | <table border="3">
<tr bgcolor="#ff0000">
<td> c1 </td>
<td> c2 </td>
<td> c3 </td>
</tr>
<tr>
<td> c4 </td>
<td> c5 </td>
<td> c6 </td>
</tr>
<tr>
<td> c7 </td>
<td> c8 </td>
<td> c9 </td>
</tr>
</table>
| Same as above |
c1 |
c2 |
c3 |
c4 |
c5 |
c6 |
c7 |
c8 |
c9 |
|
| | An example usage of the simple HTML mirror which we programmed on the previous page.
The bottom example shows, as in earlier similar tables, the HTML rendering
of the constructed table. The map-concat function used in the example is defined in the general LAML library as (define (map-concat f lst) (apply string-append (map f lst))). In order to actually evaluate the expression you should load laml.scm of the LAML distribution first. |