From a0736c7a174b9748f4695936bf14152f05e06fd5 Mon Sep 17 00:00:00 2001 From: Stefan Lobbenmeier Date: Fri, 25 Aug 2023 05:55:03 +0200 Subject: When is not a function, but an expression (#4603) https://kotlinlang.org/docs/control-flow.html#when-expression --- kotlin.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kotlin.html.markdown') diff --git a/kotlin.html.markdown b/kotlin.html.markdown index 12008074..6ca2dcf2 100644 --- a/kotlin.html.markdown +++ b/kotlin.html.markdown @@ -297,7 +297,7 @@ fun helloWorld(val name : String) { else -> println("none of the above") } - // "when" can be used as a function that returns a value. + // "when" can be used as an expression that returns a value. var result = when (i) { 0, 21 -> "0 or 21" in 1..20 -> "in the range 1 to 20" -- cgit v1.2.3