Cleanup

Removing $ since it doesn't have correct precedence (which can't be changed
without changing the operator name), so it doesn't work in all the cases
you'd expect.

Renaming repeat's recursive helper to loop, which is more idiomatic.