|
Re: List comprehensions ranges: msg#00005lang.nemerle.devel
We had similar request / discussion here http://nemerle.org/forum/viewtopic.php?t=220 The last post gives some nicer syntax: for (0 <= i < 3) // 0, 1, 2 for (0 <= i <= 3) // 0, 1, 2, 3 for (0 <= i < 7 step 2) // 0, 2, 4, 6 for (0 <= i < 3 step -1) // 2, 1, 0 I guess this could be dressed as foreach (i in $[0 <= i < arr.Length]) arr [i] or something similar.
The problem is that such syntax differences are quite unintuitive and hard to read... -- Kamil Skalski http://nazgul.omega.pl
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: macros attached to methods, Kamil Skalski |
|---|---|
| Next by Date: | Re: List comprehensions ranges, mei |
| Previous by Thread: | List comprehensions ranges, mei |
| Next by Thread: | Re: List comprehensions ranges, mei |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |