Great, I was wondering what would be an idiomatic way of solving this in Clojure.
Given the addition of core.logic into Clojure 1.3.0, one could even skip the implementation of cKanren. Although to be honest I'm not altogether sure how core.logic measures up to cKanren.