If you wish, you can label a lambda expression, perhaps to disinguish between
nested function calls (e.g., a forEach()
invoking a lambda expression that has
its own forEach()
). A label consists of an identifier followed by @
, where
the label precedes the lambda expression.
Then, your return
can use the custom label (e.g., return@toSender
).
Tags: