Elixir Variable Length Quantity

The instructions for this exercise are inadequate. The basic algorithm is barely described if you aren’t already familiar with it. “So, if you have a 32-bit value, you have to unpack it into a series of 7-bit bytes” means that you separate the number into 8-bit bytes, the first bit of which is a flag and the last 7-bits represent a number 0-127. Then “you leave bit #7 clear” means set the flag bit (the highest one) to 0. “In all of the preceding bytes, you set bit #7.” means in all the other preceding bytes, set the flag to 1.

There is no definition of an “incomplete sequence”. Reading the tests, I figured out that it’s one where the last byte has a flag of 1, but it would be easier if the instructions said that.

And I finally got almost all the tests running when one failed because I’m supposed to be able to identify a list of integers even though the instructions don’t ever mention it.