xsl-list
[Top] [All Lists]

RE: [xsl] XSLT 2.0: Are arguments to functions evaluated eagerly or lazily?

2007-07-18 04:40:40
--On Wednesday, July 18, 2007 07:30:13 PM +0900 Justin Johansson wrote:

LISP has two such functions 'cond' and 'if' which do the same thing as my
two examples.

In Common Lisp 'cond' is a macro and 'if' is a "special form". If you wanted to write either as a function, you would have to write the arguments to the invocation as closures to prevent them being evaluated before the function is called. It also means that you can't pass 'cond' or 'if' as the function argument to 'funcall' or 'apply'.

--
Owen Rees
========================================================
Hewlett-Packard Limited.   Registered No: 690597 England
Registered Office:  Cain Road, Bracknell, Berks RG12 1HN

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--