Skip to content

Instantly share code, notes, and snippets.

View takanuva's full-sized avatar

Paulo Torrens takanuva

View GitHub Profile
@takanuva
takanuva / database.pl
Last active August 19, 2025 17:21
Prolog interpreter
likes(bob, apple).
likes(bob, grape).
likes(ronald, X) :- yellow(X), likes(alice, x).
yellow(banana).
append(nil, M, M).
append([H | T], X, [H | R]) :- append(T, X, R).