HackerTrans
トップ新着トレンドコメント過去質問紹介求人

sivizius

no profile record

コメント

sivizius
·3 年前·議論
For the record:

    let squares: Vec<_> = numbers.iter().filter(x => x >= 0).map(x => x * x).collect();
is not valid Rust, but this is:

    let squares: Vec<_> = numbers.iter().filter(|&&x| x >= 0).map(|x| x * x).collect();