Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cmbrownfield/cbfb85550da2ba09bb0b5a09888f0276 to your computer and use it in GitHub Desktop.
Save cmbrownfield/cbfb85550da2ba09bb0b5a09888f0276 to your computer and use it in GitHub Desktop.
Prolog gensym example (broken)
:- use_module(library(gensym)).
:- dynamic student/3.
gensym:gensym(student, S1).
gensym:gensym(student, S2).
student(S1, john, doe).
student(S2, jane, doe).
show_id_of_john :-
student(ID, john, doe), write(ID).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment