#KT-2341 Fixed

This commit is contained in:
Michael Zehender
2013-12-12 16:14:57 +01:00
committed by Alexander Udalov
parent e179e6bb2f
commit 6546d7a1e7
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ val <T> List<T>.lastIndex : Int
* @includeFunctionBody ../../test/ListTest.kt head
*/
val <T> List<T>.head : T?
get() = this.get(0)
get() = if (this.isNotEmpty()) this.get(0) else null
/**
* Returns all elements in this collection apart from the first one