diff --git a/kmath-coroutines/src/jvmMain/kotlin/space/kscience/kmath/structures/LazyStructureND.kt b/kmath-coroutines/src/jvmMain/kotlin/space/kscience/kmath/structures/LazyStructureND.kt index 1d23162f5..6acf5c1c8 100644 --- a/kmath-coroutines/src/jvmMain/kotlin/space/kscience/kmath/structures/LazyStructureND.kt +++ b/kmath-coroutines/src/jvmMain/kotlin/space/kscience/kmath/structures/LazyStructureND.kt @@ -48,13 +48,13 @@ public suspend fun StructureND.await(index: IntArray): T = * PENDING would benefit from KEEP-176 */ @OptIn(PerformancePitfall::class) -public inline fun StructureND.mapAsyncIndexed( +public inline fun StructureND.mapAsyncIndexed( scope: CoroutineScope, crossinline function: suspend (T, index: IntArray) -> R, ): LazyStructureND = LazyStructureND(scope, shape) { index -> function(get(index), index) } @OptIn(PerformancePitfall::class) -public inline fun StructureND.mapAsync( +public inline fun StructureND.mapAsync( scope: CoroutineScope, crossinline function: suspend (T) -> R, ): LazyStructureND = LazyStructureND(scope, shape) { index -> function(get(index)) }