Skip to content

Commit

Permalink
map.foreach uten key
Browse files Browse the repository at this point in the history
  • Loading branch information
rtc11 committed Mar 14, 2024
1 parent e201bb4 commit 0cc188a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions kafka-streams/main/libs/kafka/stream/MappedStream.kt
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,9 @@ class MappedStream<T : Any> internal constructor(
val named = Named.`as`("foreach-${namedSupplier()}")
stream.foreach(mapper, named)
}

fun forEach(mapper: (value: T) -> Unit) {
val named = Named.`as`("foreach-${namedSupplier()}")
stream.foreach { _, value -> mapper(value) }
}
}

0 comments on commit 0cc188a

Please sign in to comment.