Playing around with Prolog, inspired by Closure Reducers.