Skip to content

Instantly share code, notes, and snippets.

@tautologico
Created July 16, 2011 19:46
Show Gist options
  • Select an option

  • Save tautologico/1086691 to your computer and use it in GitHub Desktop.

Select an option

Save tautologico/1086691 to your computer and use it in GitHub Desktop.
Vizinhos no teste de Einstein.
vizinho_esq(C1, C2, [C1,C2|_]).
vizinho_esq(C1, C2, [C3|T]) :- vizinho_esq(C1, C2, T).
vizinho_dir(C1, C2, [C2,C1|_]).
vizinho_dir(C1, C2, [C3|T]) :- vizinho_dir(C1, C2, T).
vizinho(C1, C2, S) :- vizinho_esq(C1, C2, S).
vizinho(C1, C2, S) :- vizinho_dir(C1, C2, S).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment