0

Starting with a binary list (just 1s and 0s) we are going to roll a ball over it. The ball has a position and a direction. At every step the ball does the following:
If the number at it's position is 1, then flip the direction. It "bounces".
Flip the number, if it's 0 replace it with 1, if it...