danilopedraza / symstatic

The Symstatic programming language code repository
https://symstatic.org/book
GNU General Public License v3.0
2 stars 0 forks source link

Ranges #27

Closed danilopedraza closed 1 month ago

danilopedraza commented 3 months ago

I want a special syntax to specify a range. Something like this:

(1..3).reduce((acc, cur) -> acc + cur) # 3

Notice that a..b includes a and excludes b.

danilopedraza commented 3 months ago

I think it would be nice if ranges went in both ways: from left to right or from right to left, depending on its ends. If a < b:

danilopedraza commented 1 month ago

Right now this is enough.