What’s the most idiomatic way to write
in Kotlin? Here’s what I have:
Obviously you can remove the referential equality check. But what bothers me more is still needing to include
to get the flow typing to work, even thought we only reach that branch if
, which seems to imply
Anyone have something nicer?