Prolog day 2 solutions a little better.