Ditto, I just noticed something that I didn’t know while trying to
simplify some of my code: a negative bit shifting is the equivalent of a
shifting of the same amount of bits, but in the other direction.
Example:
4 << -1
=> 2
2 >> -1
=> 4
I like it, saves me a couple of lines and makes my code clearer.
(1…10) doesn’t expand to [1,2,3,4,5,6,7,8,9,10], it expands to
1,2,3,4,5,6,7,8,9,10. a = 1,2,3,4,5,6,7,8,9,10 does the right thing (see
the multiple assignment section of the pickaxe book). [(1…10)] works
too.