Hacker News new | ask | show | jobs
by fertel 5702 days ago
The c# version is pretty concise. And since 3.0 with implicitly typed local variables, its gotten less verbose.

var result = seq.Where(a=>a %3==0).Select(a=>a*a);

1 comments

Yea, but try moving the predicate to a local function, and you get:

Func<int, bool> pred = a => a %3 == 0.

Mix in more complex types (say a dictionary with a tuple in it), and it starts getting pretty verbose.