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

Subject: RE: [xsl] XSLT 2.0: Are arguments to functions evaluated eagerly or lazily?
From: Owen Rees <owen.rees@xxxxxx>
Date: Wed, 18 Jul 2007 12:40:17 +0100
--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

Current Thread