Jakub
09/08/2018, 2:35 PMmap
operator?razvandragut
09/08/2018, 2:46 PMfun <T> UserApi.map(mappingF: (UserApi) -> T) : T = mappingF(this)
razvandragut
09/08/2018, 2:53 PMUserApi("a", 1, "b").map { User(it.name, it.age) }
tschuchort
09/08/2018, 3:06 PMlet
. map
makes no sense here because UserApi
is not a functorrazvandragut
09/08/2018, 3:30 PMlet
🙂 and I tried to not mention Functor as I had no intention to explain it