Hi all,
We are used to being able to create a list with a 'tail' that may
contain zero or more uninstantiated elements, using syntax like L = [a,
b, c | Tail]. But why should we not have a list with a section at the
start or in the middle, maybe even more than one such section,
containing 0 or more uninstantiated elements? If you go:
L = [a, b, c | Tail], append(L, [d, e, f], L2),
you get a series of solutions with Tail instantiated to different length
lists. But why shouldn't you get a single solution, something like:
L2 = [a,b,c, '$opening', d,e,f],
which would then unify with any list starting with [a,b,c] and finishing
with [d,e,f] ? I don't see what is logically different about the end of
a list from its start or middle, that a representation of an unknown
number of elements should be allowed there.
--Jasper
_______________________________________________
Users-prolog mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/users-prolog