1 2 3 4 5 6
( fromto(Xs, [This,Next | Rest], [Next|Rest],[_]), foreach(Diff,Diffs) do Diff #= abs(This - Next) ),