Doing it the arithmetic way: easier to unit-test.
Arithmetic version of the Dragon Curve, complete.