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

[FEATURE] let, also, run similar to Kotlin's Any objects #3741

Open
gbotka opened this issue Sep 10, 2024 · 0 comments
Open

[FEATURE] let, also, run similar to Kotlin's Any objects #3741

gbotka opened this issue Sep 10, 2024 · 0 comments

Comments

@gbotka
Copy link

gbotka commented Sep 10, 2024

Describe the feature
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/let.html
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/also.html
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/run.html

These generated functions reduce boilerplate and allow function references for mutation.

var something = new Something();
return z(y(x(something)));
var something = new Something();
return something
              .apply(this::x)
              .apply(this::y)
              .let(this::z);

Describe the target audience
Everybody who likes to use function references and likes more readable code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant