trealla
trealla copied to clipboard
Problem with soft-if-then-else
I don't know if you like it but here is another discrepancy: (*->/2)
$ cat ite_3.pl main :- member(X,[true,\+true]), ( member(X,[\+true,true,\+true]) *-> write(here1) ; member(X,[true,\+true,true]) *-> write(here2) ), write({X}), fail. $ SWI, EcLiPsE here1{true}here1{\+true}here1{\+true} $ tpl ite3_pl # v2.63.25 ?- main. here1{true}here2{true}here2{true}here1{\+true}here1{\+true}
Originally posted by @flexoron in #651
Simplify slightly...
main :-
member(X,[true,false]),
( member(X,[false,true,false]) *->
write(here1)
; write(here2)
),
write({X}), fail.