type-aligned-0.9.6: Various type-aligned sequence data structures.

Copyright(c) Atze van der Ploeg 2014
LicenseBSD-style
Maintaineratzeus@gmail.org
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Data.TASequence.FastQueue

Description

A type aligned sequence, a queue, with worst case constant time: |>, and tviewl.

Based on: "Simple and Efficient Purely Functional Queues and Deques", Chris Okasaki, Journal of Functional Programming 1995

Documentation

data FastQueue tc a b #

Instances

TASequence FastQueue # 

Methods

tempty :: FastQueue c x x #

tsingleton :: c x y -> FastQueue c x y #

(><) :: FastQueue c x y -> FastQueue c y z -> FastQueue c x z #

tviewl :: FastQueue c x y -> TAViewL FastQueue c x y #

tviewr :: FastQueue c x y -> TAViewR FastQueue c x y #

(|>) :: FastQueue c x y -> c y z -> FastQueue c x z #

(<|) :: c x y -> FastQueue c y z -> FastQueue c x z #

tmap :: (forall x y. c x y -> d x y) -> FastQueue c x y -> FastQueue d x y #