No video

Clojure Day 3 Advent of Code 2022 Rucksack Reorganization

  Рет қаралды 660

Fred Overflow

Fred Overflow

Күн бұрын

Пікірлер: 4
@Marco9603
@Marco9603 Жыл бұрын
It's the first time I come up with a solution similar to yours :) I enjoy your videos a lot, always super insightful!
@MartinClausen
@MartinClausen Жыл бұрын
Isn't the order of args to comp the reversed. According to the doc string comp applies its arguments right to left. As an example: ((comp str +) 8 8 8) => "24". I don't understand how the tests would pass.
@fredoverflow
@fredoverflow Жыл бұрын
The rightmost TRANSDUCER runs first (only once total), but the leftmost REDUCING FUNCTION runs first (once per element). Copy/paste comment from my first Transducers video: Are you familiar with the Decorator Design Pattern? Consider new BufferedReader(new FileReader(file)) During construction, the FileReader CONSTRUCTOR runs first. But later during actual use, the BufferedReader OBJECT acts first and delegates to the FileReader OBJECT. Makes sense? Same with transducers. ((comp f g) x) indeed means (f (g x)), so during construction, the TRANSDUCER g runs first. But later during actual use, the REDUCING FUNCTION that f returned runs first (not f itself!) and delegates to the REDUCING FUNCTION that g returned (not g itself!)
@MartinClausen
@MartinClausen Жыл бұрын
@@fredoverflow Got it. Great explanation.
Clojure Day 4 Advent of Code 2022 Camp Cleanup
7:02
Fred Overflow
Рет қаралды 542
My 10 “Clean” Code Principles (Start These Now)
15:12
Conner Ardman
Рет қаралды 216 М.
КТО ЛЮБИТ ГРИБЫ?? #shorts
00:24
Паша Осадчий
Рет қаралды 4,3 МЛН
Underwater Challenge 😱
00:37
Topper Guild
Рет қаралды 46 МЛН
SCHOOLBOY. Последняя часть🤓
00:15
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 16 МЛН
The FASTEST way to PASS SNACKS! #shorts #mingweirocks
00:36
mingweirocks
Рет қаралды 12 МЛН
I run untested, viewer-submitted code on my 500-LED christmas tree.
45:17
Master Go Programming With These Concurrency Patterns (in 40 minutes)
46:15
15 years of Clojure - 15 reasons we love it!
1:05
Flexiana
Рет қаралды 2,4 М.
I've been using Redis wrong this whole time...
20:53
Dreams of Code
Рет қаралды 356 М.
The Most Legendary Programmers Of All Time
11:49
Aaron Jack
Рет қаралды 556 М.
So you want to make a Game Engine!? (WATCH THIS before you start)
14:39
Giant Sloth Games
Рет қаралды 298 М.
Printing numbers is hard! #somepi
7:40
Fred Overflow
Рет қаралды 529
Every Programming Language Ever Explained in 15 Minutes
15:29
Flash Bytes
Рет қаралды 322 М.
A Simpler Way to See Results
19:17
Logan Smith
Рет қаралды 106 М.
Compilers, How They Work, And Writing Them From Scratch
23:53
Adam McDaniel
Рет қаралды 171 М.
КТО ЛЮБИТ ГРИБЫ?? #shorts
00:24
Паша Осадчий
Рет қаралды 4,3 МЛН