flexoron
flexoron
So, someone can say the term contains list notation.
``` $ swipl -q # v9.0.4 ?- dif([W|[V]],[V|[W]]), V=[[W|V]|X],W=[[V|W]|Y]. W = _S1, % where _S1 = [[_S2|_S1]|Y], _S2 = [[_S1|_S2]|X], V = [[_S1|_S2]|X], dif(f([[_S1|_S2]|X], Y), f([[_S2|_S1]|Y], X)). % No printing...
``` ?- dif(V,W), dif(W,V), V=[V]. V = [V], dif:dif([[]],[[]]). % missing dif:dif(...) displayed below ?- dif(W,V), dif(V,W), V=[V]. V = [V], dif:dif(W,[[]]). % missing dif:dif(...) displayed above ```
Ah,thanks. Unfortunately I've only swipl to compare results, and this seems not very effective. (sorry) ``` $ swipl -q ?- dif(V,W), dif(W,V). dif(V, W), dif(W, V). ```
Ok, thank you. One last scryer (faulty) example: ``` ?- dif(fu(W),fu(V)), V=[V]. V = [V], dif:dif(fu(W),fu([[]])). ?- dif(fu(V),fu(W)), V=[V]. V = [V], dif:dif(fu([[]]),[[]]). % unexpected According to the very first...
Yes. The example refers to functor fu which get lost as well.
Yes(as long as there is no op): ``` ?- op(1,xf,b). true. ?- [user]. a b. ?- X b. X = a. ```
nospace example: ``` ?- [user]. ""(). ?- % unexpected
Another irritation: ``` $ scryer-prolog -f ?- use_module(library(lists)). true. ?- use_module(library(time)). true. ?- time((length(L,1), append(L,[_|Y],LT),Y="")). % CPU time: 0.000s, -13 inference (exception?) % This time -13 L = [_A], Y...
And another one: ``` $ scryer-prolog -f ?- use_module(library(lists)). true. ?- use_module(library(time)). true. ?- time((length(L,15), append(L,[_|Y],LY),Y="")). % Goes positive but % CPU time: 0.000s, 1 inference % unexpected : ?-...