Pihentagy
08/15/2024, 8:08 AMJoffrey
08/15/2024, 8:11 AMwhenwhen (population) {
    in 0..<10_000 -> "small"
    in 10_000..<100_000 -> "medium"
    in 100_000..<1_000_000 -> "large"
    else -> "extra large"
}Joffrey
08/15/2024, 8:13 AMwhenPihentagy
08/15/2024, 8:26 AMloke
08/15/2024, 9:06 AMwhen (val p = population) {
  p < 0 -> error("negative population")
  p < 10000 -> "small"
  p < 100000 -> "medium"
  ...
  else -> "extra large"
}Joffrey
08/15/2024, 9:54 AMwhenJoffrey
08/15/2024, 9:57 AMJoffrey
08/15/2024, 9:58 AMwhenKlitos Kyriacou
08/15/2024, 10:02 AMwhen (val p = population) {
  p < 0 -> error("negative population")
  ...
}pp < 0val p = population
when {
  p < 0 -> error("negative population")
  ...
}Pihentagy
08/16/2024, 9:54 AMwhenJoffrey
08/16/2024, 9:56 AMwhen