Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think Rusts terseness shows here - I think C#'s approach is the best. Also, if you don't use `.ToArray()`, you still have an IEnumerable which is very usable.


Also true in Rust. You don't have to use `collect` at the end and you still get an iterator.

    let results = foo
            .into_iter()
            .filter(|s| s.contains("banned"))




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: