Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/scala/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
什么是实施“a”的好方法;“延迟”;在Scalaz中列出流_Scala_Scalaz Stream - Fatal编程技术网

什么是实施“a”的好方法;“延迟”;在Scalaz中列出流

什么是实施“a”的好方法;“延迟”;在Scalaz中列出流,scala,scalaz-stream,Scala,Scalaz Stream,我尝试过这样做,但没有成功: Process("Hello", "Salut", "Bye", "Ciao").interleave(time.sleep(0.5.seconds).repeat) (过程(“你好”、“敬礼”、“再见”、“再见”)zip(time.awakeEvery(0.5秒)) .map(u._1)@user2864740这意味着在添加接收器时(在我的示例中为标准输出)对于流程,没有向其发送任何信息。我试图为熟悉scalaz stream的人保持问题的简洁性。你建议我更新问

我尝试过这样做,但没有成功:

Process("Hello", "Salut", "Bye", "Ciao").interleave(time.sleep(0.5.seconds).repeat)
(过程(“你好”、“敬礼”、“再见”、“再见”)zip(time.awakeEvery(0.5秒))
.map(u._1)

@user2864740这意味着在添加
接收器时(在我的示例中为标准输出)对于
流程
,没有向其发送任何信息。我试图为熟悉scalaz stream的人保持问题的简洁性。你建议我更新问题以提供更多细节吗?是的-至少是对观察到的行为的解释。酷!是的,这似乎是可行的。你知道为什么上面不可行吗?实际上我认为原因是儿子,这不起作用的原因是你在交错流,而在我的解决方案中,你在压缩流。我认为当你看压缩和交错的定义时,这是显而易见的。