@henrik what @karelpeeters said would result in this
Copy code
inline fun <reified T> collectionOf(coll: Set<Any>) = if (coll.any { it is T }) "all is ok" else "contains value(s) of type other than ${T::class.simpleName}"
collectionOf<Map<K,V>>(someCollection)