From b0b14ecaa29b39c8fc65a50cd557690b8a78f5b2 Mon Sep 17 00:00:00 2001 From: Alex Tkachman Date: Thu, 22 Dec 2011 14:50:21 +0200 Subject: [PATCH] examples converted to new syntax --- examples/src/benchmarks/FList.kt | 4 ++-- examples/src/benchmarks/LockPerf.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/src/benchmarks/FList.kt b/examples/src/benchmarks/FList.kt index 17179b006bb..0d0c329d596 100644 --- a/examples/src/benchmarks/FList.kt +++ b/examples/src/benchmarks/FList.kt @@ -30,8 +30,8 @@ class StandardFList (override val head: T, override val tail: FList) : FLi fun FList.plus2(element: T): FList = when(this) { - is EmptyFList<*> => OneElementFList(element) - else => StandardFList(element, this) + is EmptyFList<*> -> OneElementFList(element) + else -> StandardFList(element, this) } fun FList.plus3(element: T) : FList = diff --git a/examples/src/benchmarks/LockPerf.kt b/examples/src/benchmarks/LockPerf.kt index 2937c59dfd1..77379eb7f31 100644 --- a/examples/src/benchmarks/LockPerf.kt +++ b/examples/src/benchmarks/LockPerf.kt @@ -8,7 +8,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.CountDownLatch; import java.util.concurrent.locks.ReentrantLock; -fun Int.latch(op: fun CountDownLatch.() : T) : T { +fun Int.latch(op: CountDownLatch.() -> T) : T { val cdl = CountDownLatch(this) val res = cdl.op() cdl.await()