Updated best.R: reference parent environment in anonymous function