-
Notifications
You must be signed in to change notification settings - Fork 0
lists
Andrew Matthews edited this page Aug 30, 2025
·
1 revision
I envisage a syntax very similar to the Haskell or Erlang list comprehension syntaxes:
xs: int[];
xs = [1, 2, 3, 4, 5];
ys: [int] = [x in xs # x % 2 == 0];
The list comprehension can be directly translated into normal LINQ syntax on a regular List<T>. With a little effort, so can the array syntax. There's also no real reason why we can't have comprehensions on arrays either.