ref: 42be27517c8057733afe2d31b8bf7b98ee6f6578
dir: /lists.pl/
:- module(lists, []). % List predicates length([], 0). length([_|Tail], Length) :- length(Tail, Length0), Length is Length0 + 1. append([], Ys, Ys). append([X|Xs], Ys, [X|Rest]) :- append(Xs, Ys, Rest).