Turns out recursion is still the answer