jedesah
jedesah

Reputation: 3033

What is a good way to implement a "delayed" list stream in Scalaz

I tried doing this, but that did not work:

Process("Hello", "Salut", "Bye", "Ciao").interleave(time.sleep(0.5.seconds).repeat)

Upvotes: 1

Views: 70

Answers (1)

Pavel Chlupacek
Pavel Chlupacek

Reputation: 864

(Process("Hello", "Salut", "Bye", "Ciao") zip (time.awakeEvery(0.5 s)) .map(_._1)

Upvotes: 1

Related Questions