The Array Cast cover image

Fold and Other Functional Conjunctions

The Array Cast

CHAPTER

How to Execute a Fold

There are four main variants of fold they all do roughly what I described but one choice the program against the make is which order do I want to apply the the items the and so there's a forward fold where you apply the items from the front to the back. A reverse fold whereyou apply from the last toward the front or if you don't keep the intermediate state you just get the final result. And then while I was at it I put in a couple of variants that do not operate by item they they just execute the verbs repeatedly on the arguments. The only advantage of this is you can use the colon to actually when you let you done yeah.

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.
App store bannerPlay store banner