Complete the solution so that it reverses all of the words within the string passed in.
Example(Input --> Output):
"The greatest victory is that which requires no battle" --> "battle no requires which that is victory greatest The"
#" "
regex)
; implement
(defn reverse-words [sentence]
(clojure.string/join " " (reverse (clojure.string/split sentence #" "))))
; Example walkthrough:
; (reverse-words "hello world!")
; 1. split: "hello world!" -> ["hello" "world!"]
; 2. reverse: ["hello" "world!"] -> ["world!" "hello"]
; 3. join: ["world!" "hello"] -> "world! hello"
; test
; execute implement function
(defn tester [arg exp]
(= (reverse-words arg) exp))
; args & exception
(comment
(tester "hello world!" "world! hello")
(tester "yoda doesn't speak like this" "this like speak doesn't yoda")
(tester "foobar" "foobar")
(tester "kata editor" "editor kata")
(tester "row row row your boat" "boat your row row row"))