is there an elegant way to get SAM conversion in k...
# getting-started
g
is there an elegant way to get SAM conversion in kotlin? If i have
Copy code
class Something{

  interface Factory { fun create() : Something }

  //...
}
is there a way for me to use SAM conversion to convert a closure to a
Something.Factory
instance? ie, can i do
Copy code
val x : Something.Factory = { Something(); }
?