Fork me on GitHub

(Edit: figured it out! :D)


hey @vanrysss haven't used hikaricp but if the pool is assigned to a top level var then at compile time- when the namespace is read and top level vars are evaluated- the pool will be instantiated and therefore may initiate connections to the db.

Drew Verlee16:01:08

I'm having trouble understanding the destructuring in this function:

(defn split-sentence [{:keys [sentence]}]
  (map (fn [word] {:word word}) (clojure.string/split sentence #"\s")))
I'm used to seeing the symbol on the right. I.e
[{assign-go :assign-from}] 
as is demonstrated here: is ':keys' a function?


:keys [sentence] means that calling (split-sentence {:sentence "The quick brown fox..."}) will result in the local symbol sentence being bound to "The quick brown fox...."

Drew Verlee17:01:09

@jonahbenton, thanks! you answer plus reading (this)[] helped me fine tune my understanding of keywords and destructuring: