I'm using JPL and launch some queries to Swi-Prolog. The program works fine with all queries, but one.
This query is not working:
assert(like(X, Y) :- element(I, [1, 2, 3], X), element(I, [2, 3, 4], Y) ).
Exception in thread "main" jpl.PrologException: PrologException: error(uninstantiation_error(element(_3, '.'(2, '.'(3, '.'(4, []))), _4)), context(:(system, /(assert, 2)), '2-nd argument'))
If I put the query in a .pl fle (without assert, obvisously) and run it with consult, works fine! But if I type the query in console mode, return the same error like JPL. So, where is the problem?