3 ms·
There is no reason changing only the syntax would prevent the compiler from inferring in/out types. It would be something more akin to: let squares: Vec<
by shakow 4y ago
There is no reason changing only the syntax would prevent the compiler from inferring in/out types. It would be something more akin to:
let squares: Vec<_> = numbers.iter().filter(fn(x) { x >= 0 }).map(fn(x) { x * x }).collect();