diff --git a/docs/examples/README.md b/docs/examples/README.md index 87e7625..09b75b5 100644 --- a/docs/examples/README.md +++ b/docs/examples/README.md @@ -414,10 +414,10 @@ SELECT * { csv:parse (?rowJson "excel -h") } ``` ## Lambdas in SPARQL -The function pair `norse:fn.of` and `norse:fn.call` is used to define and invoke a lambda. The definition of a lambda allows +The function pair `norse:sparql.fn.of` and `norse:fn.call` is used to define and invoke a lambda. The definition of a lambda allows is based on conventional SPARQL expressions which however are evaluated lazily. -* The function `norse:fn.of(var1, ... varN, expr)` first accepts a list of input sparql variables followed by a single sparql expression. +* The function `norse:sparql.fn.of(var1, ... varN, expr)` first accepts a list of input sparql variables followed by a single sparql expression. Any non-input variable mentioned in `expr` is substituted with the current binding's value. The result of the function is an RDF literal of type `norse:lambda` which holds the lambda. The syntax of lambda literals is `?v1 v2 -> expr`. * The function `norse:fn.call(lambdaLiteral, value1, ... valueN)` is used to invoke a lambda. The declared input variables are thereby substituted with the corresponding @@ -430,9 +430,9 @@ is based on conventional SPARQL expressions which however are evaluated lazily. PREFIX norse: SELECT ?resultA ?resultB { BIND('Dear' AS ?salutation) - BIND(norse:fn.of(?honorific, ?name, CONCAT(?salutation, ' ', ?honorific, ' ', ?name)) AS ?greetingsFn) - BIND(norse:fn.call(?greetingsFn, "Mrs.", "Miller") AS ?resultA) - BIND(norse:fn.call(?greetingsFn, "Ms.", "Smith") AS ?resultB) + BIND(norse:sparql.fn.of(?honorific, ?name, CONCAT(?salutation, ' ', ?honorific, ' ', ?name)) AS ?greetingsFn) + BIND(norse:sparql.fn.call(?greetingsFn, "Mrs.", "Miller") AS ?resultA) + BIND(norse:sparql.fn.call(?greetingsFn, "Ms.", "Smith") AS ?resultB) } ```