Learn Reduce, Group-by, and Juxt by creating a Look Up Map (Clojure Tutorial)
on the code again
Sometimes you might need to access records often and quickly. Clojure provides really cool options to get data structured in really nice ways to do that. In this video, I cover 3 of them!
Clojure is awesome, I think where it gets tricky is when you come across functions that aren't common in other languages so when you're starting out using it, they arent the first ones that come to mind (such as juxt and group-by). By running through examples like this I hope to show the utility of those functions in a practical way.
Gist: https://gist.github.com/danownsthisspace/4c231fd58f2d191dfc7732095cbd1edb
00:00 intro
00:12 The problem 00:28 Using filter 00:34 Why use a lookup map 02:17 Create lookup map using reduce 03:50 Looking at the into function 05:17 Solution using group-by solution 07:44 Solution using juxt 10:45 Plead for subs ... https://www.youtube.com/watch?v=n0BTsKVs1Lw
100803182 Bytes