Rewrite SEQ without using recursion.

Allows for very long regexes to be processed. Doesn't require the result to be reversed afterwards.