Rehash enclosing anonymous function