Rename the function, return and for keywords and remove the lambda keyword.

Fixes #6194