`.map(::MyClass)`
# announcements
j
.map(::MyClass)
q
how it will be?
use map like this
listOf("str").map {MyClass(it)}
👍 1
e
Jake's implementation uses the map function call notation(not a lambda) because the argument is a method reference for `MyClass`'s constructor(which will implicitly use
it
as the constructor argument)
q
how it will be on my example?
k
Again, his exact code should work fine.
j
listOf("str").map(::MyClass) . is same as listOf("str").map{ MyClass(it) }