Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Overhaul structuring and examples #1235
I'd caution that the tour is for "bite-sized introductions" and not detailed specs. I would show each example first, then describe the parts.
I don't know how folks teach this, but I'd suggest showing a for loop first, because everyone knows what that must mean. Add that it's really sugar for
Then say a for comprehension collects the results computed by the yield. Then add that it's sugar for other method calls.
Then throw in a filter.
Finally add the bit about how semantics depend on the underlying type. Add a