all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
|||
(defn rosetta-compare [s1 s2]
|
||||
(let [len1 (count s1), len2 (count s2)]
|
||||
(if (= len1 len2)
|
||||
(compare (.toLowerCase s1) (.toLowerCase s2))
|
||||
(- len2 len1))))
|
||||
|
||||
(println
|
||||
(sort rosetta-compare
|
||||
["Here" "are" "some" "sample" "strings" "to" "be" "sorted"]))
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
(sort-by (juxt (comp - count) #(.toLowerCase %))
|
||||
["Here" "are" "some" "sample" "strings" "to" "be" "sorted"])
|
||||
Loading…
Add table
Add a link
Reference in a new issue