Re: [xsl] Here's how to create a function that has context, without passing it context

Subject: Re: [xsl] Here's how to create a function that has context, without passing it context
From: Liam R E Quin <liam@xxxxxx>
Date: Fri, 16 Nov 2012 21:05:13 -0500
On Fri, 2012-11-16 at 23:28 +0000, Costello, Roger L. wrote:

> In this message I show how to create functions that have context, but
> you don't have to give it the context. 
> 
> This technique is so cool.

You have discovered closures.

Even if your example can be done in many other ways (of course),
closures can be very useful and very powerful.

They can be hard to explain, so tutorials and examples like yours can be
very helpful.

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml

Current Thread