Kotlin: "if item not in list" proper syntax
Given Kotlin's syntax to look for items in a list,
if (x in myList)
as opposed to using the idiomatic Java statement,
if (myList.contains(x))
how can one express the not in case? The compiler doesn't like either of these...
if (x not in mylist)
if !(x in mylist)
Is there an idiomatic way to express this other than if !(mylist.contains(x)))? I didn't see it mentioned in the <a href="https://kotlinlang.org/docs/reference/control-flow.html" rel="nofollow noreferrer">Control Flow...