Open weaversa opened 2 years ago
I thought to name it generateEnd
because we already use this naming construct with, for example, update
and updateEnd
.
This is kind of odd - the nightly accepts the x ! i
syntactic sugar...
Cryptol> let x@i = i
Cryptol> x : [10][10]
[0x000, 0x001, 0x002, 0x003, 0x004, 0x005, 0x006, 0x007, 0x008,
0x009]
Cryptol> let y!i = i
Cryptol> y : [10][10]
[error] at <interactive>:4:1--4:2
Value not in scope: y
Without any special treatment, y ! x
just defines an infix operator !
Added "low-hanging fruit" as it looks like a good ticket for someone looking to get started with Cryptol hacking.
We have indexing and slicing from the left and right with
@
,@@
,!
and!!
, but we only have a left-hand generate --x @ i = ...
Have you considered adding the natural dual,
x ! i = ...
? This construction would be useful when (for example) building sequences from numbers, wherei
is the low order bit ofx
.