Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rule 5.2.1 The lambda parameter of the function should be placed in the last place in the argument list #357

Closed
petertrr opened this issue Oct 5, 2020 · 1 comment · Fixed by #360
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@petertrr
Copy link
Member

petertrr commented Oct 5, 2020

With a such notation it is easier to use curly brackets, code becoming more readable.
Good example:

// declaration
fun myFoo(someArg: Int, myLambda: () -> Unit) {
// ...
}

// usage
myFoo(1) { 
println("hey")
}
@petertrr petertrr added the enhancement New feature or request label Oct 5, 2020
@petertrr petertrr added this to the Chapter 5 milestone Oct 5, 2020
@petertrr
Copy link
Member Author

petertrr commented Oct 5, 2020

I think we should also clarify how to handle functions with several lambda arguments.

@kentr0w kentr0w self-assigned this Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants