开发者

Haskell: FIFO monad

开发者 https://www.devze.com 2023-04-06 07:58 出处:网络
Is there a standard (or at least commonly used) package with a monad for FIFO queues?I read about this one in a paper a while ago, and I\'ve used开发者_开发知识库 it a couple times, but I\'d like to s

Is there a standard (or at least commonly used) package with a monad for FIFO queues? I read about this one in a paper a while ago, and I've used开发者_开发知识库 it a couple times, but I'd like to stop reimplementing wheels (it's fun, but unproductive).


I don't think there is. I would use a State monad with a Seq container as state.


There's a nifty version of corecursive queues on hackage: http://hackage.haskell.org/package/control-monad-queue

I wouldn't call it standard by any means, but it certainly reflects a fair amount of work and testing.

The linked monad reader article is a really good read too.

0

精彩评论

暂无评论...
验证码 换一张
取 消