I think this illustrates how well pattern matching works for certain types of code. For the balance function, 7 lines of Qi becomes 45 lines of javascript. And I even think those 7 lines are easier to read.
Agreed. I think it would become quite a bit simpler if this weren't persistent and you could just move some references around. But yes, it is very verbose.