tried moving helper function to where the other global util functions are defined to try avoid namespace method disappearing

This commit is contained in:
James Strachan
2012-02-21 10:41:02 +00:00
parent e39aa727a9
commit 724f7860ab
2 changed files with 4 additions and 3 deletions
+4
View File
@@ -19,6 +19,10 @@ inline fun linkedList<T>(vararg values: T) : LinkedList<T> = values.to(LinkedLi
/** Returns a new HashSet with a variable number of initial elements */
inline fun hashSet<T>(vararg values: T) : HashSet<T> = values.to(HashSet<T>(values.size))
/** Returns a new hash map */
inline fun <K,V> hashMap() = HashMap<K,V>()
val Collection<*>.indices : IntRange
get() = 0..size-1