An abstract list data type with O(1) time concatenation (the current
implementation uses difference lists). Here a is the type of list elements.
List a is a Monoid: mempty corresponds to the empty list and two lists
can be concatenated with mappend (or operator Data.Semigroup.<>). Singleton
lists can be constructed using the function pure from the Applicative
instance. List a is also an instance of IsList, therefore you can use
list literals, e.g. [1,4] :: List Int is the same as pure 1
Data.Semigroup.<> pure 4; note that this requires the OverloadedLists
GHC extension. To extract plain Haskell lists you can use the toList
function from the Foldable instance.
Instances11Monad, Functor, Applicative, Foldable, IsList, Eq, …
Monad ListDefined in algebraic-graphs-0.8 · Algebra.Graph.InternalFunctor ListDefined in algebraic-graphs-0.8 · Algebra.Graph.InternalApplicative ListDefined in algebraic-graphs-0.8 · Algebra.Graph.InternalFoldable ListDefined in algebraic-graphs-0.8 · Algebra.Graph.InternalIsList (List a)Defined in algebraic-graphs-0.8 · Algebra.Graph.InternalEq a => Eq (List a)Defined in algebraic-graphs-0.8 · Algebra.Graph.InternalOrd a => Ord (List a)Defined in algebraic-graphs-0.8 · Algebra.Graph.InternalShow a => Show (List a)Defined in algebraic-graphs-0.8 · Algebra.Graph.InternalSemigroup (List a)Defined in algebraic-graphs-0.8 · Algebra.Graph.InternalMonoid (List a)Defined in algebraic-graphs-0.8 · Algebra.Graph.Internaltype Item (List a) = aDefined in algebraic-graphs-0.8 · Algebra.Graph.Internal