Peeking at the first element or chunk #3057
-
Hi folks, given a For that, I imagine an operation like def prefetchChunk[F[_], A](s: Stream[F, A]): Resource[F, Stream[F, A]] =
??? where
Is this possible? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes, I recently implemented something very close to this. |
Beta Was this translation helpful? Give feedback.
Yes, I recently implemented something very close to this.
https://github.com/armanbilge/calico/blob/0baef0034b982091a6b92735843ba432606104c3/calico/src/main/scala/calico/syntax.scala#L67-L76