Created
January 29, 2010 17:05
-
-
Save tmountain/289897 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn- get-chars | |
"gets the next char(s) in the sequence" | |
[s offset] | |
(if (>= offset (count s)) | |
(let [div-val (dec (int (/ offset (count s)))) | |
mod-val (mod offset (count s))] | |
(apply str (get-chars s div-val) (get-chars s mod-val))) | |
(subs s offset (inc offset)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment