s-webber / projog

Prolog programming for the Java platform.
Apache License 2.0
37 stars 9 forks source link

Add append/2 built-in predicate #187

Closed s-webber closed 3 years ago

s-webber commented 3 years ago

append/2 succeeds if the concatenation of the lists contained in the first argument can be unified with the second argument. e.g.:

?- append([], X).

X = []

?- append([[a,b,c],[q,w,e],[x,[y],z],[1,2,3]], X).

X = [a, b, c, q, w, e, x, [y], z, 1, 2, 3]