Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
6
Task/SEDOLs/Clojure/sedols.clj
Normal file
6
Task/SEDOLs/Clojure/sedols.clj
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
(defn sedols [xs]
|
||||
(letfn [(sedol [ys] (let [weights [1 3 1 7 3 9]
|
||||
convtonum (map #(Character/getNumericValue %) ys)
|
||||
check (-> (reduce + (map * weights convtonum)) (rem 10) (->> (- 10)) (rem 10))]
|
||||
(str ys check)))]
|
||||
(map #(sedol %) xs)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue