Skip to content

Instantly share code, notes, and snippets.

@Macorreag
Created May 29, 2019 17:33
Show Gist options
  • Save Macorreag/66e25cad68cea4c68f43d7a4f77db5c2 to your computer and use it in GitHub Desktop.
Save Macorreag/66e25cad68cea4c68f43d7a4f77db5c2 to your computer and use it in GitHub Desktop.
fibonacci en prolog
fibo(0,1).
fibo(1,1).
fibo(N,M):-N>0,N1 is N-1,N2 is N-2,fibo(N1,M1),fibo(N2,M2),M is M1+M2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment