V
Size: a a a
V
V
AR
AR
V
V
V
AR
V
V
V
ИФ
(defn- convert-characters [type characters]
(chars-join type (map (comp (current-alphabet type) str) characters)))
(defn- phrase->chars [type phrase]
(cond->> (str/split phrase #" ")
(= type :alpha) (str/join "")))
(defn convert [type phrase]
(convert-characters type (phrase->chars type phrase)))
V
AR
V
V
СС
(defn- convert-characters [type characters]
(chars-join type (map (comp (current-alphabet type) str) characters)))
(defn- phrase->chars [type phrase]
(cond->> (str/split phrase #" ")
(= type :alpha) (str/join "")))
(defn convert [type phrase]
(convert-characters type (phrase->chars type phrase)))
ИФ
get-single-character
у Вас это громоздкая композиция (convert-char (str x))
. Можно выразить как (comp convert-char str), можно оставить как есть, конечно, иногда лучше “код попросторнее”AR
ИФ
cond->>
на clojuredocs :)