Okay, I read through the lodash docs some and finally realized that 'val' is the part of the token that's being evaluated at that point in time. I mention this because I think some comments could help here, maybe even something as simple as "read the 'reduced' value of the token, if the key is present, return it, otherwise reduce the token again"