xsl-list
[Top] [All Lists]

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

2012-11-16 20:06:25
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


--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>