Closed plt-amy closed 4 years ago
[ x .. y ] is syntax for range x y [ x, y .. z ] is syntax for range_then x y z
[ x .. y ]
range x y
[ x, y .. z ]
range_then x y z
Update, with ranges generalised and owing to SquidDev's very nice let open shorthand, you can write a range stream like so:
let open
stream
let ints = S.[ 1, 2 .. 10 ]
[ x .. y ]
is syntax forrange x y
[ x, y .. z ]
is syntax forrange_then x y z