ref: 5fe8b9865cfbd7388b8f6355a73b1436d40cfb1e
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).