summaryrefslogtreecommitdiff
path: root/lang/prolog/1.8.7/src/standard
blob: bc983cab9ef4a8c224cb27378d6b889d59dc61f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
abolish    (X)                :-  elan (abolish, X). 
append     ([], X, X)         :-  !. 
append     ([X|Y], Z, [X|W])  :-  append (Y, Z, W). 
atom       (X)                :-  functor (X, Y, 0). 
atomic     (X)                :-  atom (X); integer (X). 
consult    (X)                :-  elan (consult, X). 
end                           :-  bye. 
fail                          :-  []. 
findall    (X, Y, Z)          :-  tell ("$$"), write ("[ "), findall (X,Y); 
                                  write (" ]"), told, see  ("$$"), read (Z), 
                                  seen, elan (forget, "$$"). 
findall    (X, Y)             :-  call (Y), writeq (X), write (","), []. 
integer    (X)                :-  functor (X, Y, -1). 
listing    (X). 
member     (X, [X|Z]).        
member     (X, [Y|Z])         :-  member (X, Z). 
nl                            :-  elan (line). 
non var    (X)                :-  var (X), !, []; . 
not        (X)                :-  call (X), !, []; . 
notrace                       :-  elan (trace, off). 
reconsult  (X)                :-  elan (reconsult, X). 
repeat. 
repeat                        :-  repeat. 
see        (X)                :-  elan (sysin, X). 
seen                          :-  elan (sysin, ""). 
tab        (X)                :-  tab(X,1). 
tab        (X,Y)              :-  Y<=X, !, put (32), incr(Y), tab(X,Y);. 
tell       (X)                :-  elan (sysout, X). 
told                          :-  elan (sysout, ""). 
trace                         :-  elan (trace, on). 
true. 
<          (X, Y)             :-  <= (X, Y), <> (X, Y). 
>          (X, Y)             :-  <= (Y, X). 
>=         (X, Y)             :-  <  (Y, X).