OR
(defn string->token-list [input-string]
(let [lexer (BSL.Lexer. (StringReader. input-string))]
(->> (repeatedly #(.yylex lexer))
(take-while #(not= 'EOF %))
(reverse))))
Size: a a a
OR
(defn string->token-list [input-string]
(let [lexer (BSL.Lexer. (StringReader. input-string))]
(->> (repeatedly #(.yylex lexer))
(take-while #(not= 'EOF %))
(reverse))))
OR
ВБ
ВБ
(defn string->token-list [input-string]
(let [lexer (BSL.Lexer. (StringReader. input-string))]
(take-while #(not= 'EOF %) (repeatedly #(.yylex lexer)))))
OR
[]
+ conj
ВБ
[]
+ conj
OR
user=> (-> [] (conj 1) (conj 2))
[1 2]
D
OR
D
D
Kazama gave Shaun a string of even length, and asked him to swap the characters at the even positions with the next character.
(fn [s]
(let [evens (iterate (partial + 2) 0)
odds (iterate (partial + 2) 1)
idxs (take (count s) (interleave odds evens))]
(->> idxs
(map #(nth s %))
(apply str))))
D
(fn [s]
(->> (range (count s))
(partition 2)
(map reverse)
flatten
(map #(nth s %))
(apply str)))
D
(fn [res [frst scnd & rst]]
(if (nil? frst)
res
(recur (str res scnd frst) rst)))
OR
frst
, scnd
, пчтк
AC
AK
T
TP