start with a tiny prolog from https://gist.github.com/fogus/1281919 rewritten into coffeescript, refactored to iterate out solutions and linked with tests. basic test works!