Lazy seq lesson


#1

Two quick comments:

  1. The scavenger hunt metaphor is really quite brilliant. Well done! I like how the metaphor itself clearly distinguishes the idea of the access pattern allowed by a linked list and I guess what you’d call the evaluation timing, which determines when items are realized and therefore whether the list is lazy. You might want to spell out that distinction (or a more correct version of it) even more explicitly.

  2. A third distinction which you don’t emphasize yet is the difference between the seq consumer and the seq producer, or the scavenger hunt player and the designer. It might be nice to be more clear about that. Eg, the bottom of the box is the note that is known to, read by, and acted on only by the Hunt’s designer. The box, the prize, and the directions to the next box — these are for the hunt consumer.

I really do think this metaphor is a gem but I think it might be even more powerful if you tightened up the logical correspondence between the metaphor and the reality for these three distinctions.


#2

Hey @alexisgallagher,

Thanks for the kind words. It sounds like you’re saying it’s a good thing and you want more of it. That sounds like a compliment to me! :wink:

Don’t worry, I’m going to continue to develop the metaphor and extend it as the series continues.

:slight_smile:

Rock on!
Eric