s-webber / projog

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

Add atomic_list_concat/2 and atomic_list_concat/3 built-in predicates #188

Closed s-webber closed 3 years ago

s-webber commented 3 years ago

atomic_list_concat/2 concatenates the contents of the list represented by its first argument. The predicate succeeds if the resulting concatenated atom can be unified with the second argument.

?- atomic_list_concat([a,b,c], X).

X = abc

atomic_list_concat/3 concatenates the contents of the list represented by its first argument, inserting the second argument between each element. The predicate succeeds if the resulting concatenated atom can be unified with the third argument.

?- atomic_list_concat([a,b,c], -, X).

X = a-b-c