home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng)
/
ProfitPress-MegaCDROM2.B6I
/
MAGAZINE
/
MISC
/
JNFB88.ZIP
/
TAIL.ARC
/
COUNT.PRO
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
Prolog Source
|
1987-10-22
|
303 b
|
22 lines
/* COUNT.PRO */
/* Tail recursive program that
never runs out of memory */
PREDICATES
count(real)
/* Reals can be much
bigger than integers. */
CLAUSES
count(N) :- write(N),nl,
NewN = N+1,
count(NewN).
GOAL
count(1).