Skip to content

Instantly share code, notes, and snippets.

View andrewwhitehouse's full-sized avatar

Andrew Whitehouse andrewwhitehouse

View GitHub Profile
@andrewwhitehouse
andrewwhitehouse / puzzle326.clj
Created May 13, 2019 15:01
Purely Functional Issue 326
(defn maxcat [coll]
(->> coll (map str) sort reverse (apply str)))
(maxcat [1 2 3 4 5 6 7 8 9]) ;=> 987654321
(maxcat [12 34 56 199]) ;=> 563419912
@andrewwhitehouse
andrewwhitehouse / examples.clj
Created May 12, 2019 11:42
Examples from coaching session at ClojureBridge 11th May
(println "Hello World")
(map inc (range 10))
(def numbers [10 27 26 21 22 22 45 34 59 60])
(/ (apply + 0.0 numbers) (count numbers))
(apply min numbers)