Skip to content

Commit

Permalink
Testing function, reading Clojure In Action
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnaxsom committed Mar 27, 2017
1 parent fd601cd commit b251742
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,18 @@
(defn tokenize [r s] (re-seq r s))
(def result (tokenize reg phrase))
(println result)


(defn print-all-things [things]
(let [total (count things)
first-item (first things)]
; last-item (last things)]

(defn last-item [my-list] (last my-list))

(println "first" first-item "last" (last-item things))

(dorun (map println things))))


(print-all-things ["foo" "bar" "baz"])

0 comments on commit b251742

Please sign in to comment.