Loosely matching rhymes for recursive subroutine