Re: [racket-dev] understand the implementation of "for/fold"

2021-03-26 Thread Hemanth Kapila
Thanks Sam, fwiw, I did try it via the expander. Perhaps I did not try it out with the right examples. Or I gave up too soon. I guess I need to do it a little bit more methodically. Thanks for the advice Hemanth On Sat, Mar 27, 2021 at 12:04 AM Sam Tobin-Hochstadt wrote: > > I think the best

Re: [racket-dev] understand the implementation of "for/fold"

2021-03-26 Thread Hemanth Kapila
Hi Steve, Thanks! this looks great. I believe studying your code will help me understand it a bit more. thanks a lot. On Sat, Mar 27, 2021 at 12:19 AM Stephen Chang wrote: > > Hi Hemanth, > > You can roughly think of it as a series of nested let loops and conditionals. > > I had the same

Re: [racket-dev] understand the implementation of "for/fold"

2021-03-26 Thread Stephen Chang
Hi Hemanth, You can roughly think of it as a series of nested let loops and conditionals. I had the same question once and you can see my attempt to re-implement all the for/X forms (to integrate pattern matching) here:

Re: [racket-dev] understand the implementation of "for/fold"

2021-03-26 Thread Sam Tobin-Hochstadt
I think the best way to start understanding `for/fold` is to look at the steps it takes in the macro stepper. That will give you a sense for what intermediate macros are used, and what the shape of the resulting code is. Once you understand that for some examples, it will probably be easier to

[racket-dev] understand the implementation of "for/fold"

2021-03-26 Thread Hemanth Kapila
Hi, Apologies if this is wrong mailing list for the question. I am trying to understand how "for/fold" is implemented and I am finding it tough to grok for.rkt[1] Can some one kindly provide me with some guidance on how to go about understanding the code in the collects folder? I imagine this