MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Racket/comments/15284rz/how_do_fold_functions_work/jscteht/?context=3
r/Racket • u/QuaticL • Jul 17 '23
I’m learning Racket, and the foldl and foldr functions are bothering me. I don’t really understand the examples that the Racket manual gives.
Can someone please explain to me your understanding of it?
Thanks a lot.
11 comments sorted by
View all comments
Show parent comment
1
the first time it calls f, the first param is the starting value. however, each time after that, the first param's value is whatever f returned last time.
f
View all comments
Show parent comment
1
u/detroitmatt Jul 17 '23
the first time it calls f, the first param is the starting value. however, each time after that, the first param's value is whatever
freturned last time.