Created
March 27, 2015 17:29
-
-
Save CliffordAnderson/5fa512fcc60e1a125263 to your computer and use it in GitHub Desktop.
A working example of the Say-Howdy function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "3.0"; | |
declare function local:say-howdy ($name as xs:string*) as xs:string | |
{ | |
if (fn:count($name) >1) then "Howdy, " || fn:string-join($name, " and ") || "!" | |
else "Howdy, " || $name || "!" | |
}; | |
(: local:say-howdy("Dave") :) | |
local:say-howdy(("Dave", "Laura")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment