This website requires JavaScript.
Explore
Help
Register
Sign in
aparler
/
RosettaCodeData
Watch
1
Star
0
Fork
You've already forked RosettaCodeData
0
Code
Issues
12
Pull requests
3
Projects
Releases
Packages
Wiki
Activity
Actions
master
RosettaCodeData
/
Task
/
Fibonacci-sequence
/
Prolog
/
fibonacci-sequence-7.pro
5 lines
98 B
Prolog
Raw
Permalink
Normal View
History
Unescape
Escape
Sync
2013-10-27 22:24:23 +00:00
fib
(
[
0
,
1
|
X
]
)
:-
ffib
(
0
,
1
,
X
)
.
ffib
(
A
,
B
,
X
)
:-
freeze
(
X
,
(
C
is
A
+
B
,
X
=
[
C
|
Y
]
,
ffib
(
B
,
C
,
Y
)
)
)
.
Reference in a new issue
Copy permalink