Skip to content

Instantly share code, notes, and snippets.

@d11wtq d11wtq/atbash.clj
Last active Aug 29, 2015

What would you like to do?
Atbash Cipher in Clojure
(ns atbash.core
(require [clojure.string :refer [join lower-case]]))
(def lookup
(let [alphabet "abcdefghijklmnopqrstuvwxyz"]
(zipmap alphabet (reverse alphabet))))
(defn encode
(->> (lower-case s)
(map lookup)
(filter identity)
(partition 5 5 ())
(map join)
(join " ")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.