Maybe I'm just blind, but given that there is a `....
# getting-started
m
Maybe I'm just blind, but given that there is a
.single()
, I would expect there to be function that does this: • If there are no elements: null • If there is one element: it • If there are more elements: exception However, the implementation
.singleOrNull()
returns null on multiple elements too. There have been several occassions where we now check size first and manually do a 0,1,else check to do this correctly, but am I just missing something or should I just do a language proposal?
j
m
Ha, what a timing 😄