[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Here's how to create a function that has context,

Subject: Re: 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
Re:  Here's how to create a function that has context
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.