ClojurePadawan's profile picture. I be out here learning clojure

The Clojure Padawan

@ClojurePadawan

I be out here learning clojure

Just finished setting up figwheel to get started with some clojurescript escapades, awesome work on the tutorial @bhauman


Defmulti isa nice bit of magic I just learned. Can't tell you my methods though.


TIL: You can destructure nested maps. As an example: (let [{:keys [a b] {:keys [c]} :x {:keys [] {:keys [d]} :z} :y} {:a 1 :b 2 :x {:c :skip-a-few} :y {:z {:d Integer/MAX_VALUE}}}] [a b c d]) => [1 2 :skip-a-few 2147483647]


TIL: Threading a map through a bunch of updates is way cleaner than updating it in the let bindings over and over. I'm just gonna (let [myself (update-in my-brain [:thinking-area] conj "a lot of IQ")] myself) And now I realize how much of a bruh moment this is.


TIL: update-in > assoc-in. If you don't agree name the place, time and game so we can 1v1 as long as I'm better at the game than you.


TIL: Range includes the first given number, but leaves out the last. I guess it's true that something can be both ranged and deranged at the same time.


You might not wanna feed your maps too much. Mine started being completely random when it over 8 keys.


TIL: You can use functions inside the get-in vector. I'd say it's a key lesson!


TIL: Conj adds to the start of a list, but the end of a vector. Would it kill it to be cons-istent?


This account does not follow anyone

United States Trends

Loading...

Something went wrong.


Something went wrong.