Common pattern in imperative world: ``` var didBre...
# language-proposals
m
Common pattern in imperative world:
Copy code
var didBreak = false
for (i in something) {
  if (i.someCondition) {
    print("Some condition occured!")
    didBreak = true
    break
  }
}
if (!didBreak) {
  print("Some condition didn't occur!")
}
vs
Copy code
for (i in something) {
  if (i.someCondition) {
    print("Some condition occured!")
    break
  }
} else {
  print("Some condition didn't occur!")
}
­čĹŹ 1