(define simple-html-table
(lambda (column-widht list-of-rows)
(let ((gmap (curry-generalized map))
(td-width
(modify-element td 'width
(as-string column-widht))))
(table
'border 1
(tbody
(gmap (compose tr (gmap td-width)) list-of-rows)))))) |
| | The function simple-html-table. Locally we bind gmap to the curry generalized map function. We also
create a specialized version of td, which includes a width attribute the value of which
is passed as parameter to simple-html-table .
In the body of the let construct we create the table in the same way as we have seen earlier
in this lecture.
|