Prolog implemented in JavaScript just for the hell of it