RFC: general sequences
Tomasz Zielonka
tomasz.zielonka at gmail.com
Mon May 23 16:40:17 EDT 2005
On Mon, May 23, 2005 at 10:28:29PM +0200, Benjamin Franksen wrote:
> > And can you compare quickly it with Data.Queue? It also appears to be
> > constant time, but has a lot less operations, does it win you
> > anything over your sequences or is Data.Queue strictly inferior.
>
> I think the main difference is that Data.Queue is asymmetric, i.e.
> constant time enQueueing on one side, constant time deQueueing on the
> other side, whereas Data.Seq is symmetric, i.e. elements can be added
> to and taken from at both ends in constant time.
I think what John wants to say is that Data.Queue is unneccesary unless
it is more efficient than Data.Seq used as a queue.
Best regards
Tomasz
More information about the Libraries
mailing list