You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/docs/tutorial.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -380,7 +380,7 @@ The functor ``autoinc()`` issues a new number every time it is evaluated.
380
380
However, it is not permitted in recursive relations. It can be used to create unique numbers (acting as identifiers) for symbols, such as in the following example:
381
381
```prolog
382
382
.decl A(x: symbol)
383
-
A(“a”). A(“b”). A(“c”). A(“d”).
383
+
A("a"). A("b"). A("c"). A("d").
384
384
385
385
.decl B(x: symbol, y: number)
386
386
.output B
@@ -454,12 +454,12 @@ The syntax is ``count:{<sub-goal>}``.
454
454
The following example outputs the number of "blue" cars - that is, the number of elements in ``Car`` with second argument "blue":
455
455
```prolog
456
456
.decl Car(name: symbol, colour:symbol)
457
-
Car(“Audi”, ”blue”).
458
-
Car(“VW”, “red”).
459
-
Car(“BMW”, “blue”).
457
+
Car("Audi", "blue").
458
+
Car("VW", "red").
459
+
Car("BMW", "blue").
460
460
461
461
.decl BlueCarCount(x: number)
462
-
BlueCarCount(c) :- c = count:{Car(_,”blue”)}.
462
+
BlueCarCount(c) :- c = count:{Car(_,"blue")}.
463
463
.output BlueCarCount
464
464
```
465
465
@@ -483,7 +483,7 @@ The ``min`` syntax is ``min <var>:{<sub-goal>(<var>)>}``, and the ``sum`` syntax
483
483
Consider the following example which will not compile:
0 commit comments