a406aa
Last Updated: February 25, 2016
·
889
· runexec

Clojure - Easy ASCII Alphabet

Update: A better version can be found here https://coderwall.com/p/smreha

user> (def lowercase (range 65 91))
#'user/lowercase
user> (def uppercase (map #(+ 32 %) lowercase))
#'user/uppercase
user> (def alphabet 
        (map char
             (flatten
              (merge lowercase 
                     uppercase))))
#'user/alphabet
user> (clojure.pprint/pprint 
       (partition 13 alphabet))
((\a \b \c \d \e \f \g \h \i \j \k \l \m)
 (\n \o \p \q \r \s \t \u \v \w \x \y \z)
 (\A \B \C \D \E \F \G \H \I \J \K \L \M)
 (\N \O \P \Q \R \S \T \U \V \W \X \Y \Z))
nil