beebster implementation in clojure