Update symbol defaults, factories to have only lower alphabets.
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-09-21 21:01:52 +03:00
parent 6833ade696
commit 20c1d1ef1b
2 changed files with 11 additions and 43 deletions
@@ -2,7 +2,7 @@
(:require [clojure.string :as cs])
(:gen-class))
(defn lower-english-alphabet-factory
(defn english-alphabet-factory
"Return the English alphabet with only lowercase letters"
[]
(reduce
@@ -10,23 +10,11 @@
""
(range (int \a) (inc (int \z)))))
(defn english-alphabet-factory
"Return the English alphabet with lower and upper case letters"
[]
(let [letters (lower-english-alphabet-factory)]
(str letters (cs/upper-case letters))))
(defn lower-ukrainian-alphabet-factory
(defn ukrainian-alphabet-factory
"Return the Ukrainian alphabet with only lowercase letters"
[]
"абвгґдеєжзиіїйклмнопрстуфхцчшщьюя")
(defn ukrainian-alphabet-factory
"Return the Ukrainian alphabet with lower and upper case letters"
[]
(let [letters (lower-ukrainian-alphabet-factory)]
(str letters (cs/upper-case letters))))
(defn digit-set-factory
"Return digits"
[]
@@ -48,14 +36,10 @@
(cond
(= language-code "en")
(str (english-alphabet-factory)
(punctuation-symbol-factory)
(digit-set-factory)
\ )
(= language-code "uk")
(str (ukrainian-alphabet-factory)
(punctuation-symbol-factory)
(digit-set-factory)
\ )
:else