You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it's probably worth explicitly mentioning that these are lazy operations, and what this means. Coming from a language like JavaScript where there isn't a similar concept of laziness (e.g. Array.prototype.filter eagerly returns a new Array). Emphasising both that map doesn't instantly run (and shouldn't be relied on for side-effects!), and that an iterator can be collected into different collections (maybe showing an example of collecting into a BTreeSet or similar - right now the collect section hints at this, but I suspect isn't as explicit as it could be) would help clarify this, as well as making the power of these combinators more clear.
The text was updated successfully, but these errors were encountered:
https://rust-exercises.com/100-exercises/06_ticket_management/07_combinators introduces
filter
,map
and friends.I think it's probably worth explicitly mentioning that these are lazy operations, and what this means. Coming from a language like JavaScript where there isn't a similar concept of laziness (e.g.
Array.prototype.filter
eagerly returns a newArray
). Emphasising both thatmap
doesn't instantly run (and shouldn't be relied on for side-effects!), and that an iterator can be collected into different collections (maybe showing an example of collecting into aBTreeSet
or similar - right now thecollect
section hints at this, but I suspect isn't as explicit as it could be) would help clarify this, as well as making the power of these combinators more clear.The text was updated successfully, but these errors were encountered: