Answer the question
In order to leave comments, you need to log in
How to write a predicate to be in a list?
the essence of the question is this, there is such a graph
graph1( [ edge( 3,4 ), edge( 4,5 ) ] ).
and it turns out you need to write predicate
neighbor( G, N1, N2 ) which checks if there is edge( N1, N2 ) in G( graph 1 is the same for example) and returns n1,n2,G if it's true
Here are my attempts how I tried to do it tell me what's wrong or tell me in which direction to dig
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question