Method to create a Correspondence in which the lambda is last (for Kotlin)
Open
P3
type=enhancement
- Dominant language
- Java
- Stars
- 2.8k
- Forks
- 275
- Avg merge
- 7m
- Merged PRs (30d)
- 4
Description
In kotlin, if the last argument of a method is a lambda, it can be moved out of the parentheses.
Therefore it would be great if you could swap the predicate and the description of `Correspondence.from`.
Then this:
```kotlin
val CONTAINS_SUBSTRING =
Correspondence.from(
{ left, right ->
left != null && right != null && left.contains(right)
}, "contains")
```
would be come this:
```kotlin
val CONTAINS_SUBSTRING = Correspondence.from("contains") { left, right ->
left != null && right != null && left.contains(right)
}
```
Contributor guide
Assessment
This issue has not been assessed yet.