Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
14
Task/String-comparison/Clojure/string-comparison-4.clj
Normal file
14
Task/String-comparison/Clojure/string-comparison-4.clj
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
(defn str-before [a b]
|
||||
(neg? (compare a b)))
|
||||
|
||||
(defn str-after [a b]
|
||||
(pos? (compare a b)))
|
||||
|
||||
(str-before "abc" "def") ; true
|
||||
(str-before "def" "abc") ; false
|
||||
(str-before "abc" "abc") ; false
|
||||
|
||||
(str-after "abc" "def") ; false
|
||||
(str-after "def" "abc") ; false
|
||||
|
||||
(sort ["foo" "bar" "baz"]) ; ("bar" "baz" "foo")
|
||||
Loading…
Add table
Add a link
Reference in a new issue