[Bese-devel] Cond for parenscript

Attila Lendvai attila.lendvai at gmail.com
Wed Nov 15 10:54:40 UTC 2006


> Hi,
>
> Attached is a patch that adds a 'cond' form to parenscript for generating
> proper 'if' / 'else if ' / 'else' javascript forms. It could already be
> faked with a trivially simple parenscript macro, but that would output a
> nested bunch of ifs in the javascript, which was kind of ugly. This 'cond'
> is not integrated as well with 'if' as it could have been (express 'if' in
> terms of 'cond') but this is because 'if' has a special case when it is an
> expression - it expands into a (condition ? then : else) form. I could have
> made cond expand into a nested series of those in that case, but didn't have
> time for that.

i'm using (js:import-macros-from-lisp 'when-bind 'awhen 'if-bind 'aif 'cond)

i've added import-macros-from-lisp for things like this.

-- 
- attila

"- The truth is that I've been too considerate, and so became
unintentionally cruel...
 - I understand.
 - No, you don't understand! We don't speak the same language!"
(Ingmar Bergman - Smultronstället)


More information about the bese-devel mailing list