Anonymous user
Filter: Difference between revisions
→Idiomatic approach
Line 1,134:
Idiomatic approach in Dy is to use non-strict iterators (which can be combined without intermedate data structures) and translate the result to an array if needed:
<lang Dyalect>
▲var arr = xs.Iterate().Filter(x => x % 2 == 0).Select(x => x.ToString())
print(arr.ToArray())</lang>
|