AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
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.