11 lines
180 B
Plaintext
11 lines
180 B
Plaintext
|
fn main() {
|
||
|
println!("{:?}", three_squared(10));
|
||
|
}
|
||
|
|
||
|
fn three_squared(upto: u32) -> Vec<u32> {
|
||
|
(0..upto)
|
||
|
.filter(|i| i % 3 == 0)
|
||
|
.map(|i| i.pow(2))
|
||
|
.collect()
|
||
|
}
|