It's not clear from the method body what recurse1/2 are used for—could you add scaladoc to clarify?