next up previous Return to CLIP Main Page
Next: CIAO and Other CC Up: Document: distrib_imperial Previous: The CIAO Compiler

Example

% :- module(fib,[fib/2],ciao(h)).
:- module(fib,[fib/2],andorra(h)).
:- entry(fib(g,f)).
fib(0,1).
fib(1,1).
fib(A,B) :-
        A>1,
        C is A-1,
        D is A-2,
        fib(C,E),
        fib(D,F),
        B is F+E.



<herme@fi.upm.es>-< webmaster@clip.dia.fi.upm.es>
Last updated on Mon Mar 31 21:20:55 MET DST 1997