Does anyone know of a purely functional equivalent to a circular buffer? I'm looking for something that supports efficient insertion and lookup, and doesn't rely upon mutable data. I don't want to use mutable data because I'd like to embed this in CCA, which to my knowledge doesn't yet support Kleisli arrows.
So far the best I've found is Data.Sequence.Seq, which in my tests outperforms mutable vectors, but only for reads from the head or tail of the sequence. Indexing into the middle of the sequence is relatively slow. Alternative approaches are also welcome. John
_______________________________________________ haskell-art mailing list [email protected] http://lists.lurk.org/mailman/listinfo/haskell-art
