Hacker News new | ask | show | jobs
by tcc619 5027 days ago
scala offers a syntax of programming similar to ruby especially in terms of collection operations. i found this to be a big win over java.

scala: List(54,2,46).filter(x => x == 2) ruby: [54,2,46].select{|x| x == 2}

1 comments

C#: new List<int>{54, 2, 46}.Where(x => x == 2)