User blog comment:Googleaarex/My Dollar Function TM/@comment-10429372-20140407055128/@comment-1605058-20140407122737

Two state machine which allows us further extension:

0 1 1 r 0

0 _ 1 r 0

0 $ _ r 1

1 1 $ l 0

1 _ _ l halt