Rust (programming language): Difference between revisions

Content deleted Content added
top: Added additional descriptor for clarity
{{rust|for}} loops and iterators: Add annotations to closure. This should be for making it clear to readers how a closure in Rust works
Line 267:
 
<syntaxhighlight lang="rust">
(1..=100).filter(|&x: i8| -> bool { x % 3 == 0 }).sum()
</syntaxhighlight>