From d0d77181e3f52f1c3b419d48f052638d069cf7a6 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Tue, 22 Oct 2013 19:01:34 +0400 Subject: [PATCH] ifEmpty for collections --- core/util.runtime/src/org/jetbrains/jet/utils/collections.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/util.runtime/src/org/jetbrains/jet/utils/collections.kt b/core/util.runtime/src/org/jetbrains/jet/utils/collections.kt index 301f562946a..fa20409d6f1 100644 --- a/core/util.runtime/src/org/jetbrains/jet/utils/collections.kt +++ b/core/util.runtime/src/org/jetbrains/jet/utils/collections.kt @@ -55,4 +55,6 @@ public fun Iterator.keysToMapExceptNulls(value: (K) -> V?): Map> C.ifEmpty(body: () -> C): C = if (isEmpty()) body() else this \ No newline at end of file