generative-art-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Sequential

Synopsis

Documentation

class Foldable f => Sequential f where Source #

Data structures that are sequential, so that we can use them to build input-polymorphic functions. This is quite handy, as a lot of functions require special input, and it’s cumbersome to juggle fromList and toList all over the place.

It’s a good idea to add the ideal type as part of the type signature,

-- This will work best with a vector input, but can convert everything else as well
doStuff :: Sequential vector => vector a -> [a]

Methods

toVector :: f a -> Vector a Source #

toSeq :: f a -> Seq a Source #

Instances

Instances details
Sequential Seq Source # 
Instance details

Defined in Data.Sequential

Methods

toVector :: Seq a -> Vector a Source #

toSeq :: Seq a -> Seq a Source #

Sequential Vector Source # 
Instance details

Defined in Data.Sequential

Methods

toVector :: Vector a -> Vector a Source #

toSeq :: Vector a -> Seq a Source #

Sequential [] Source # 
Instance details

Defined in Data.Sequential

Methods

toVector :: [a] -> Vector a Source #

toSeq :: [a] -> Seq a Source #