Common Lisp guys have their CL-WHO, which makes HTML templating integrated with the \"main\" language thus making the task easier. For those who don\'t know CL-WHO, it looks
Perl's CGI module has support for something like this.
use CGI ':standard';
use Lisp::Fmt
print header();
print table( { -border => 1, -cellpading => 4},
loop({ below => 25, by=> 5}, sub {
my $i = shift;
tr( {-align => 'right'} ,
loop({ from => $i, below $i + 5}, sub {
my $j = shift;
td({-bgcolor => ($oddp eq $j ? 'pink' : 'green')}
fmt("~@R", 1+$j);
})
)
});
I tried to keep it lispy, so you'll have to implement a lispy loop
function yourself. I don't really program Common List, so I hope I understood your code correctly.