This is beautiful!
var lst = IntStream.range(0, 20)
.map(i -> Pair.of(i, "hey"))
.toList();
(1 to: 20) collect: [ :each | Array with: each with: 'hey' ]
And Smalltalk got it from Lisp.
Just saying for comparison.
Edit: forgot to mention - the syntax is entirely consistent and unlike Linq does not seem bolted on to the rest of the language.
var list = Array.from({length:20}, (_, i)=>({"Foo":i+1, "Bar": "hey"}))
Anyway I agree, I like C# for the same reasons I like Java. Very readable but still powerful.
list = Enum.map(1..20, & %{foo: &1, bar: "hey"})
Not meant to be a comparison, just another example
val list = (1..20).map { Pair(it, "hey") }