Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
[Rust] for loop with functional programming
cwchen
Aug 22nd, 2017
724
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
Rust
0.10 KB
| None
|
0
0
raw
download
clone
embed
print
report
fn
main
(
)
{
for
i
in
(
1
..
)
.filter
(
|
x
|
x
%
2
==
1
)
.take
(
5
)
{
println
!
(
"{}"
,
i
)
;
}
}
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
Untitled
30 min ago | 7.90 KB
Untitled
Bash | 1 hour ago | 3.53 KB
dm.cfg
7 hours ago | 1.00 KB
Untitled
8 hours ago | 8.11 KB
Untitled
PHP | 9 hours ago | 1.35 KB
Untitled
15 hours ago | 1.42 KB
Untitled
16 hours ago | 15.21 KB
Untitled
17 hours ago | 0.01 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!