// WITH_RUNTIME // INTENTION_TEXT: "Replace with 'firstOrNull{}'" // IS_APPLICABLE_2: false fun foo(list: List) { var result: String? = null for (s in list) { // search for first non-empty string in the list if (s.length > 0) { // string should be non-empty result = s // save it into result break } } }