rocketraman
10/10/2018, 12:54 PMSequence.map
and flatMap
? These operations on Sequence
are not inlined, unlike List
, so you get the error Suspension functions can only be called within coroutine body
. I don't want to use runBlocking
inside the lambda.Jonathan
10/10/2018, 12:55 PMrocketraman
10/10/2018, 12:58 PMDico
10/10/2018, 1:51 PMJonathan
10/10/2018, 2:40 PMSequence.map
will be executed (or if it will be executed at all). This is inherent to sequences since everything will be evaluated lazily on the context of iterator's usage.Dico
10/10/2018, 2:57 PMSequence
can't make any guarantees about where/when the programmer invokes a terminal operation.