Closed brettcannon closed 6 months ago
Hello! This isn't a bug, unit isn't intended to specify size.
The linked page does say how to set the size:
Each segment of a bit array can be given options to specify the representation used for that segment.
- size: the size of the segment in bits.
I do understand that "unit isn't intended to specify size", but what I don't understand is how to specify the size and unit
simultaneously based on the documentation as the error message suggests; there's no example of two options being specified simultaneously.
FYI this was taken care of implicitly in another commit:
Thanks!
Saying
io.debug(<<3:unit(2)>>)
leads to the error:But https://tour.gleam.run/data-types/bit-arrays/ doesn't say how to specify the size as well and every guess I have made for how to do that hasn't worked.