
Fold and Scan
The Array Cast
The J Fold and C Plus Plus Algorithm
The way that the J folds work is applying like a unary operation on the state, I believe, and then the binary operation. So if you're going to pack it into one fold you have to have two elements of state. You can't tack that information into a number easily. And what I was hoping with the J fold is that I could just specify like the max as one and then that binary binary operation which is, you know, a fork with,. you know, max in the middle plus and then right to get the current element. It does something close to that but not exactly what I needed.
00:00
Transcript
Play full episode
Remember Everything You Learn from Podcasts
Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.