Join Slack
Communities
Powered by
hm, you could overload the invoke operator as it l...
# language-proposals
k
kirillrakhman
06/26/2017, 5:57 PM
hm, you could overload the invoke operator as it looks similar to the square brakets
Copy code
operator fun <K, V> Map<K,V>.invoke(key: K) = get(key) ?: keyNotFound(this, key)
Open in Slack
Previous
Next