Sequencing an Iterator[Gen[T]]

14 views
Skip to first unread message

Mathias

unread,
Mar 3, 2016, 1:53:49 PM3/3/16
to scalacheck
Dear all,

due to my still limited FP foo I'm not sure whether I am seeing things right and would be glad if someone could help me out:
Is it possible to implement sequencing for iterators (or other lazy collections like `scala.Stream`):

    def sequence[T](gens: Iterator[Gen[T]]): Gen[Iterator[T]]

so that it will work for *infinite* iterators, i.e. carry the laziness over to the result?

Does anyone have an idea on how I might be able to achieve this?

Thanks in advance for any help!

Cheers,
Mathias
Reply all
Reply to author
Forward
0 new messages