amuletml / amulet

An ML-like functional programming language
https://amulet.works/
BSD 3-Clause "New" or "Revised" License
326 stars 15 forks source link

Add range syntax #262

Closed plt-amy closed 4 years ago

plt-amy commented 4 years ago

[ x .. y ] is syntax for range x y [ x, y .. z ] is syntax for range_then x y z

plt-amy commented 4 years ago

Update, with ranges generalised and owing to SquidDev's very nice let open shorthand, you can write a range stream like so:

let ints = S.[ 1, 2 .. 10 ]