I'm new to prolog language recently started teaching my self this language I came across an interesting question which says to Write a database for a predicate cycle/1 such that query
cycle(X)
returns the instantiations
X = food
X = me
X = pizza
X = food
X = me
X = pizza
in an endless cycle
How do we do that can someone help me out am trying to touch my self this language!
hence: it's JUST FOR LEARNING PURPOSES!
what(food). what(me). what(pizza). cycle(X):- repeat, what(X).
- Will Ness