vbx_wx -6 Junior Poster

Hello,I have a problem in my prolog project about Train Routig:
I have a few link:

link(milano,paris).
link(milano,berlin).
link(paris,budapest).
link(berlin,madrid).
.................

I need to make a route() predicate that takes a origin city and a destination,and a list path. The list path should contain what city traverse for exemple from milano to paris: path = [a,b,c,d],how can I make this? how it suposed to know what city traverse a link ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.