Recursion, in any language is specified in two steps:
In Prolog these often become two rules. Ex, finding the various connections from an East coast city.
connect(FROM, TO) :- flight_ew(FROM, TO). connect(FROM, TO) :- flight_ew(FROM, X), connect(X, TO).