clean and additional clojure solution for p7, and refactor on js p7
clean and more explicit ruby solution