@nate So incredibly pleased with myself for using partial
today β I used it to get rid of an unsightly bit of repeated code, which I would have found so tolerable a year ago.
I canβt wait to use juxt
!!!
@nate So thank you for your awesome podcasts! Keep up the amazing work βΒ I learn so much!!
FWIW βΒ Iβm using it in my first clojure-lanterna program, to gain an understanding of getting keystrokes:
(defn loop-until-esc []
" get key, print, until you hit ESC key"
(let [get-key (partial s/get-key-blocking scr)]
(loop [k (get-key)]
(if-not (= k :escape)
(do
(println k)
(recur (get-key)))
nil))))
@genekim awesome! So glad to hear you improving your code. I've really enjoyed these function-focused episodes. There's so much power and depth to the core of Clojure.
Once upon a time, that (s/get-key-blocking scr)
would never have bothered me β now, it seems intolerable. π
Oh yes. Tidied that up quite nicely.