Loops? Graphs? Prolog!
deepclause.substack.com