“Syntax error: Operator expected” in Prolog

Remove the space between edge and the opening parenthesis.

Spaces delimit terms, so Prolog will think that edge is an operator rather than the functor of a compound term.

Leave a Comment

tech