ref: 1c8789198373a52da9e80dc9b2b1ee2b67af61c4
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).