Tricky Clojure Functions: partial, comp, juxt and more

preview_player
Показать описание
Hey there! So, in this video, we're gonna walk through some functions that might give you a bit of trouble, especially if you're new to Clojure or functional programming. But don't worry, because even though they can be a bit tricky, they're actually pretty useful, and chances are you'll come across them in real-world code sooner or later. Let's dive in!

#clojure #functionalprogramming #functions

Support the channel:

Follow me:

I'm truly grateful for your support, and thank you for watching! 🙏
Рекомендации по теме
Комментарии
Автор

Good afternoon. Thanks for the great video, as always. I would like to add to share my experience in team. Never use comp fn in code when it needs to be read backwards. It's best not to use comp at all. This tool is applicable when the issue of performance arises, and in this case it should be used together with transducers, which already greatly raises the bar for the reader. If you get to this situation, don’t forget to generously describe everything with comments. And in the case of transducers, the comp needs to be read in the usual order. Like (sequence (comp (map :v) (map inc)) [{:v 1} {:v 2} {:v 3}]).

velios
Автор

Thanks for the video! Very clear explanations. I would like to add regarding the juxt function, that it comes habdy when you want to pass the same argument to different functions.

josejavierblancorivero
Автор

I’m new to clojure. I was trying to find a flatten function. Maybe this is unconventional, but I used “mapcat identity coll”.

mikemerinoff
Автор

I wasn't aware about map operating in chunks... where can I read more like this?

ysonkar
welcome to shbcf.ru