@@ -271,9 +271,20 @@ Multiple binding sets specified this way are independent of each other. The abov
271271 - If ``y `` is bound, then ``x `` and ``y `` are bound.
272272
273273That is, ``bindingset[x] bindingset[y] ``, which states that at least one of ``x `` or ``y `` must
274- be bound, is different from ``bindingset[x,y] ``, which states that both ``x `` and ``y `` must be
274+ be bound, is different from ``bindingset[x, y] ``, which states that both ``x `` and ``y `` must be
275275bound.
276276
277+ The latter can be useful when you want to declare a :ref: `predicate with result <predicates-with-result >` that takes multiple input arguments::
278+
279+ bindingset[a, b]
280+ int getSum(int a, int b) {
281+ result = a + b
282+ }
283+
284+ You can then use this in a :ref: `select clause <select-clauses >`, for example::
285+
286+ select getSum(3, 5)
287+
277288.. _database-predicates :
278289
279290Database predicates
@@ -283,7 +294,7 @@ Each database that you query contains tables expressing relations between values
283294("database predicates") are treated in the same way as other predicates in QL.
284295
285296For example, if a database contains a table for persons, you can write
286- ``persons(x, firstName, _, age) `` to constrain ``x ``, ``firstName `` and ``age `` to be the
297+ ``persons(x, firstName, _, age) `` to constrain ``x ``, ``firstName ``, and ``age `` to be the
287298first, second, and fourth columns of rows in that table.
288299
289300The only difference is that you can't define database predicates in QL. They are defined by the
0 commit comments