Hacker News new | past | comments | ask | show | jobs | submit login

The `&` captures the surrounding variables by reference. This means that the lambda will have access to variables defined in the scope where the lambda is declared, without making a copy of them. In this case, `userId` is captured by reference, so any changes to `userId` outside the lambda would be reflected inside the lambda as well.



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: