Skip to content

Instantly share code, notes, and snippets.

@flash42
flash42 / concatenative_lisp.clj
Created July 27, 2014 11:58
Comments for elvish documentation Appendix A
(require ['clojure.string :refer '(upper-case)])
;; In Clojure there is a good vector type for storing strings
(def strs ["aha" "LOLaha" "hahaLOL" "hum?"])
;; One can write it in clojure with the concatenative form as well
;; http://clojuredocs.org/clojure_core/clojure.core/-%3E%3E
(->> strs (filter #(re-find #"LOL" %)) (map upper-case) sort)