Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Aklakan authored Oct 22, 2024
1 parent c3592f1 commit 06aff2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,12 +414,12 @@ SELECT * { <example-data/people.csv> csv:parse (?rowJson "excel -h") }
```
## Lambdas in SPARQL

The function pair `norse:sparql.fn.of` and `norse:sparql.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:sparql.fn.call` is used to define and invoke a lambda. The definition of a lambda
is based on conventional SPARQL expressions which however are evaluated lazily.

* 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 result of the function is an RDF literal of type `norse:sparql.fn` which holds the lambda. The syntax of lambda literals is `?v1 v2 -> expr`.
* The function `norse:sparql.fn.call(lambdaLiteral, value1, ... valueN)` is used to invoke a lambda. The declared input variables are thereby substituted with the corresponding
values. The thereby obtained effective SPARQL expression is then evaluated as usual and the result is returned.

Expand Down

0 comments on commit 06aff2a

Please sign in to comment.