RosettaCodeData/Task/Collections/Prolog/collections-1.pro

12 lines
165 B
Prolog
Raw Permalink Normal View History

2019-09-12 10:33:56 -07:00
% create a list
L = [a,b,c,d],
% prepend to the list
L2 = [before_a|L],
% append to the list
append(L2, ['Hello'], L3),
% delete from list
exclude(=(b), L3, L4).