``` myList.map { when(it.someMethod()) { ...
# language-proposals
k
Copy code
myList.map {
    when(it.someMethod()) {
        ...
        // "it" would have previously been provided by .map {...}, but is now provided by the when block and is of a different type
    }
}