Re: Building lists and sublists



"andrea" <kerny404@xxxxxxxxx> writes:

why using "->" instead of ","

Try both versions in SWI's graphical tracer: "?- gtrace, par([], Ws).".
When you reach get_char(C) in the tracer, enter "a b c d." on the
terminal and proceed further in the tracer. Notice that the "," version
leaves choice-points on the call stack, and the "->" version doesn't.

All the best,
Markus Triska

.