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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With