q4c12-twofinger

This package provides efficient alternating sequences based on finger trees. These can represent sequences made up of two types of element, e and a where two of the same type of element cannot follow each other directly. Four different flavours are provided, isomorphic to ([(a, e)], a), ([(e, a)], e), [(a, e)], and [(e, a)]. Cons-like operations are O(1) amortised, and append operations are O(log(min(n, m))) amortised. For more details, please see the Haddock documentation of Q4C12.TwoFinger.


Keywords
bsd2, data-structures, library, Propose Tags , Q4C12.TwoFinger, Q4C12.TwoFinger.Internal
License
BSD-3-Clause-Attribution
Install
cabal install q4c12-twofinger-0.2

Documentation

Mega-repo for my public Haskell projects.

In roughly decreasing order of likelihood of being useful to anyone else, they are:

  • q4c12-twofinger is an efficient alternating sequence type.

  • q4c12-xml is an opinionated XML parser/renderer and RELAX NG schema generator. Write a parser, and get a renderer and schema for no extra effort!

  • q4c12-foldable-utils are some utility functions I can't live without.

  • q4c12-mappend is Data.Map, but with the alternative append-ish Monoid instance. (Hence the name: map-pend.)

  • q4c12-romnum is a Roman numeral generator.

  • q4c12-position is a type to represent points or contiguous ranges in text.

  • q4c12-hlist has heterogeneous lists and sums.

  • q4c12-prelude is that hippest thing, an alternative Prelude. Its module is actually called Prelude; use it with base-noprelude.

    It's not very comprehensive: I'm adding things as I find I need them.