Nitpick, I would just throw the returns for these two `if`s on the same line: `return if gram.....`