7
Giả sử tôi có một số Iterator[A]
. Tôi muốn chuyển đổi nó thành Process[Nothing, A]
của scalaz stream.Làm thế nào để chuyển đổi Iterator thành luồng scalaz?
import scalaz.stream._
def foo[A](it: Iterator[A]): Process[Nothing, A] = ???
Bạn sẽ triển khai foo
như thế nào?