开发者

Haskell: FIFO monad

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜