Skip to content

Instantly share code, notes, and snippets.

@nedzadarek
Created April 13, 2013 14:27
Show Gist options
  • Save nedzadarek/5378624 to your computer and use it in GitHub Desktop.
Save nedzadarek/5378624 to your computer and use it in GitHub Desktop.
How to use prolog in racket
#lang datalog
ancestor(A, B) :- parent(A, B).
ancestor(A, B) :-
parent(A, C), D = C, ancestor(D, B).
parent(john, douglas).
parent(bob, john).
ancestor(A, B)?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment