How to use map, apply, concat and mapcat in Clojure

preview_player
Показать описание
Clojure has tons of cool functions to help you work with maps and sequences. Here I cover mapcat by showcasing map, apply and concat along the way :)
Рекомендации по теме
Комментарии
Автор

It is so good with these videos digging in to the core of Clojure, showing how the individual pieces work and how to compose them.

Have you had a look at reducers? It’s basically parallelization for free.

CalvaTV
Автор

You are amazing 😎
Thank you so much for fullfilling my request😇

hayathbasha
Автор

Thanks, I would love to see more content on pedestal.

_ooooak
Автор

Thanks for your videos. Pls can you run a code that runs every 10 minutes and prints the current time every 10 minutes (ie. looping)

emmanuelaremu
Автор

(def numbers [1 2 4 3 1])
(map vector numbers numbers) => ([1 1] [2 2] [4 4] [3 3] [1 1])
(pmap vector numbers numbers) => ([1 1] [2 2] [4 4] [3 3] [1 1]) - this one will use multi-treading on large collections and semi-eager (works in batches)
(mapv vector numbers numbers) => [[1 1] [2 2] [4 4] [3 3] [1 1]] - same but returns vector also it's eager since you can't return a vector in parts. Map and pmap return clojure.lang.LazySeq that generates values on demand.

eugenej.
welcome to shbcf.ru