1

I tried doing this, but that did not work:

Process("Hello", "Salut", "Bye", "Ciao").interleave(time.sleep(0.5.seconds).repeat)
jedesah
  • 2,983
  • 2
  • 17
  • 29
  • @user2864740 It means that when adding a `Sink` (in my case standard output) to the `Process`, nothing is being sent to it. I was trying to keep the question succinct for people familiar with scalaz-stream. Do you suggest I update the question to provide more detail? – jedesah Apr 01 '15 at 05:46
  • Yes - at least an explanation of the observed behavior. – user2864740 Apr 01 '15 at 06:09

1 Answers1

1

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

Pavel Chlupacek
  • 864
  • 5
  • 8
  • Cool! Yes that does appear to work. Any idea why the above does not? – jedesah Apr 01 '15 at 22:33
  • Actually I think the reason why this doesn't work is that you interleaving the stream , whereas in my solution you zipping the stream. I think it would be obvious when you look on definition of ZIP and INTERLEAVE. – Pavel Chlupacek Apr 03 '15 at 05:16