Skip to content

Instantly share code, notes, and snippets.

@strattondev
Created October 6, 2013 20:47
Show Gist options
  • Save strattondev/6858892 to your computer and use it in GitHub Desktop.
Save strattondev/6858892 to your computer and use it in GitHub Desktop.
next([],[]).
next(H, []) :- next([],[]).
next(H,[TailFront|TailEnd]) :- next(TailFront, TailEnd).
cons([Head|Tail], Term) :- Term = next(Head, Tail).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment