5 ms·
In this list of loop-special-languages, XQuery also deserves an honorable mention. With the sequence being the root datatype, it makes loops rather implicit. Y
by tomtomtom777 7y ago
In this list of loop-special-languages, XQuery also deserves an honorable mention.
With the sequence being the root datatype, it makes loops rather implicit. You can write
declare function local:formatName($person) {
xs:concat($person/@firstName, " ", $person/@lastName)
};
and it will format the name of zero, one or many persons.
Working with XQuery makes you think differently about iteration and shows how much plumbing we normally use for it.
- thrownaway954 7y agoOMG!!! I remember writing code generators for ColdFusion in XQuery. Total mind shift and, dare I say, ALOT OF FUN!!! It's amazing what XQuery did.