He-Pin commented on code in PR #462:
URL: https://github.com/apache/pekko-http/pull/462#discussion_r1903094828
##########
http-core/src/main/scala/org/apache/pekko/http/impl/util/StreamUtils.scala:
##########
@@ -260,6 +261,15 @@ private[http] object StreamUtils {
}
}
+ /**
+ * Similar idea as [[FlowOps.statefulMap]] but simpler,
+ * which the state is captured instead of a passing in parameter, when
+ * the Flow completes, the state is lost, if you prefer additional emitting
on complete,
+ * use [[FlowOps.statefulMap]] instead.
+ */
+ def statefulMap[T, U](functionConstructor: () => T => U): Flow[T, U,
NotUsed] =
Review Comment:
I don' t have a better name too...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]