Thanks a lot for this lesson !
Have a good week-end,
Well, it's not very clear to me...
> contains(?, "e") returns a single-argument function which tests whether a given string contains the letter "e".
Does it generates a function fn(s) which returns s.contains("e") ?
Almost: it returns an anonymous function, which we might call fn so that we can talk about it, such that fn(s) returns fn(s, "e").
Functional programming seems to be strange...

For most of us, there was a time was programming seemed to be strange full stop. It takes a little getting used to, but like object programming, it's incredibly powerful once mastered.
Sure !

Michael Kay
------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
_______________________________________________ saxon-help mailing list archived at