Add a generator for the sorted substitution table.
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -17,6 +17,13 @@
|
||||
(shuffled-numbers)
|
||||
(zipmap symbols)))
|
||||
|
||||
(defn generate-sorted-substitution-table
|
||||
"Generate the map (char, int) for the substittion. BUT a value is the index of a symbol (from 0)."
|
||||
[symbols]
|
||||
(-> (count symbols)
|
||||
(take (range))
|
||||
(zipmap symbols)))
|
||||
|
||||
(defn find-value-in-table
|
||||
"It uses the substitution table to find the value of a char or a number."
|
||||
[char substitution-table]
|
||||
|
||||
Reference in New Issue
Block a user