mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-26 06:48:04 +02:00
6 lines
No EOL
106 B
Prolog
6 lines
No EOL
106 B
Prolog
fib(0,0).
|
|
fib(1,1).
|
|
fib(X,Y) :- X>1,
|
|
X1 is X-1, X2 is X-2,
|
|
fib(X1,Y1), fib(X2,Y2),
|
|
Y is Y1+Y2. |