Description
This is something I have found quite repeatedly through the documentation, and for that matter throughout almost everything that is written for every single language: Examples usually focus on syntax, and not on intent. This is the last one I have found, but I'm sure you can think of many others: lazy 1..5
when documenting lazy
. This is an absolutely correct and serviceable example. The problem is that when we are dealing with relatively uncommon features such as this one, we would avoid cargo-culting by learners by using examples that could be actually used in real-life code.
In this particular case, I guess that a sequence that needs heavy-weight computation and particularly that needs to compute every member based in the last one would be the case. This might be hard to think about, and focusing on syntax is generally OK because, after all, reference docs are not tutorials. However, in some cases, making the intent of the feature clearer would help newcomers to better understand the language and put it to use.
I'm sure you can come up with many other examples you have bumped upon; if that's the case and you can work on then (or assign them to me), that would be fine. If you think this is not a priority now or simply don't agree, I'd like to hear your opinion.