The Array Cast cover image

Fold and Other Functional Conjunctions

The Array Cast

00:00

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.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app