<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--Rendered using the Haskell Html Library v0.2--> <HTML ><HEAD ><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" ><TITLE >Data.Param.FSVec</TITLE ><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css" ><SCRIPT SRC="haddock-util.js" TYPE="text/javascript" ></SCRIPT ><SCRIPT TYPE="text/javascript" >window.onload = function () {setSynopsis("mini_Data-Param-FSVec.html")};</SCRIPT ></HEAD ><BODY ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="topbar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" " ></TD ><TD CLASS="title" >parameterized-data-0.1.5: Parameterized data library implementing lightweight dependent types</TD ><TD CLASS="topbut" ><A HREF="src/Data-Param-FSVec.html" >Source code</A ></TD ><TD CLASS="topbut" ><A HREF="index.html" >Contents</A ></TD ><TD CLASS="topbut" ><A HREF="doc-index.html" >Index</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="modulebar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><FONT SIZE="6" >Data.Param.FSVec</FONT ></TD ><TD ALIGN="right" ><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="infohead" >Portability</TD ><TD CLASS="infoval" >non-portable</TD ></TR ><TR ><TD CLASS="infohead" >Stability</TD ><TD CLASS="infoval" >experimental</TD ></TR ><TR ><TD CLASS="infohead" >Maintainer</TD ><TD CLASS="infoval" >alfonso.acosta@gmail.com</TD ></TR ></TABLE ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Description</TD ></TR ><TR ><TD CLASS="doc" ><P ><TT ><A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A ></TT >: Fixed sized vectors. Vectors with numerically parameterized size. </P ><P >Tutorial: <A HREF="http://www.ict.kth.se/forsyde/files/tutorial/tutorial.html#FSVec" >http://www.ict.kth.se/forsyde/files/tutorial/tutorial.html#FSVec</A > </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Synopsis</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > Nat s => <A HREF="#t%3AFSVec" >FSVec</A > s a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Aempty" >empty</A > :: <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > D0 a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3A%2B%3E" >(+>)</A > :: (Nat s, Pos s', Succ s s') => a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s' a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Asingleton" >singleton</A > :: a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > D1 a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AvectorCPS" >vectorCPS</A > :: [a] -> (<SPAN CLASS="keyword" >forall</SPAN > s. Nat s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> w) -> w</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AvectorTH" >vectorTH</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/template-haskell-2.4.0.0/Language-Haskell-TH-Syntax.html#t%3ALift" >Lift</A > a => [a] -> <A HREF="/usr/share/doc/ghc/html/libraries/template-haskell-2.4.0.0/Language-Haskell-TH-Lib.html#t%3AExpQ" >ExpQ</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AunsafeVector" >unsafeVector</A > :: Nat s => s -> [a] -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AreallyUnsafeVector" >reallyUnsafeVector</A > :: [a] -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AreadFSVec" >readFSVec</A > :: (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Text-Read.html#t%3ARead" >Read</A > a, Nat s) => <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Char.html#t%3AString" >String</A > -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AreadFSVecCPS" >readFSVecCPS</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Text-Read.html#t%3ARead" >Read</A > a => <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Char.html#t%3AString" >String</A > -> (<SPAN CLASS="keyword" >forall</SPAN > s. Nat s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> w) -> w</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Alength" >length</A > :: <SPAN CLASS="keyword" >forall</SPAN > s a. Nat s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AgenericLength" >genericLength</A > :: <SPAN CLASS="keyword" >forall</SPAN > s a n. (Nat s, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Prelude.html#t%3ANum" >Num</A > n) => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> n</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AlengthT" >lengthT</A > :: Nat s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> s</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AfromVector" >fromVector</A > :: Nat s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> [a]</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Anull" >null</A > :: <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > D0 a -> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3A%21" >(!)</A > :: (Pos s, Nat i, i :<: s) => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> i -> a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Areplace" >replace</A > :: (Nat s, Nat i) => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> i -> a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Ahead" >head</A > :: Pos s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Alast" >last</A > :: Pos s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Ainit" >init</A > :: (Pos s, Succ s' s) => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s' a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Atail" >tail</A > :: (Pos s, Succ s' s) => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s' a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Atake" >take</A > :: (Nat i, Nat s, Min s i s') => i -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s' a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Adrop" >drop</A > :: (Nat i, Nat s, Min s i sm, Sub s sm s') => i -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s' a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Aselect" >select</A > :: (Nat f, Nat s, Nat n, f :<: i, Mul s n smn, Add f smn fasmn, fasmn :<=: i) => f -> s -> n -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > i a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > n a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Agroup" >group</A > :: (Pos n, Nat s, Div s n s') => n -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s' (<A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > n a)</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3A%3C%2B" >(<+)</A > :: (Nat s, Pos s', Succ s s') => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s' a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3A%2B%2B" >(++)</A > :: (Nat s1, Nat s2, Add s1 s2 s3) => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s1 a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s2 a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s3 a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Amap" >map</A > :: Nat s => (a -> b) -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s b</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AzipWith" >zipWith</A > :: Nat s => (a -> b -> c) -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s b -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s c</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Afoldl" >foldl</A > :: Nat s => (a -> b -> a) -> a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s b -> a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Afoldr" >foldr</A > :: Nat s => (b -> a -> a) -> a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s b -> a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Azip" >zip</A > :: Nat s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s b -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s (a, b)</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Aunzip" >unzip</A > :: Nat s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s (a, b) -> (<A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a, <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s b)</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Ashiftl" >shiftl</A > :: Pos s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Ashiftr" >shiftr</A > :: Pos s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Arotl" >rotl</A > :: <SPAN CLASS="keyword" >forall</SPAN > s a. Nat s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Arotr" >rotr</A > :: Nat s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Aconcat" >concat</A > :: (Nat s1, Nat s2, Nat s3, Mul s1 s2 s3) => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s1 (<A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s2 a) -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s3 a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Areverse" >reverse</A > :: Nat s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Aiterate" >iterate</A > :: Nat s => s -> (a -> a) -> a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Agenerate" >generate</A > :: Nat s => s -> (a -> a) -> a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Acopy" >copy</A > :: Nat s => s -> a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Documentation</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><SPAN CLASS="keyword" >data</SPAN > Nat s => <A NAME="t:FSVec" ><A NAME="t%3AFSVec" ></A ></A ><B >FSVec</B > s a </TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#FSVec" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="ndoc" >Fixed-Sized Vector data type, indexed with type-level naturals, the first index for all vectors is 0 </TD ></TR ><TR ><TD CLASS="section4" ><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:FSVec')" ALT="show/hide" > Instances</TD ></TR ><TR ><TD CLASS="body" ><DIV ID="i:FSVec" STYLE="display:block;" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="decl" ><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Typeable.html#t%3ATypeable2" >Typeable2</A > <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A ></TD ></TR ><TR ><TD CLASS="decl" >Nat s => <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Control-Monad.html#t%3AFunctor" >Functor</A > (<A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s)</TD ></TR ><TR ><TD CLASS="decl" >Nat s => <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Foldable.html#t%3AFoldable" >Foldable</A > (<A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s)</TD ></TR ><TR ><TD CLASS="decl" >Nat s => <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Traversable.html#t%3ATraversable" >Traversable</A > (<A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s)</TD ></TR ><TR ><TD CLASS="decl" ><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Eq.html#t%3AEq" >Eq</A > a => <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Eq.html#t%3AEq" >Eq</A > (<A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a)</TD ></TR ><TR ><TD CLASS="decl" >(<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Data.html#t%3AData" >Data</A > a, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Typeable.html#t%3ATypeable" >Typeable</A > s) => <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Data.html#t%3AData" >Data</A > (<A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a)</TD ></TR ><TR ><TD CLASS="decl" >(<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Text-Read.html#t%3ARead" >Read</A > a, Nat s) => <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Text-Read.html#t%3ARead" >Read</A > (<A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a)</TD ></TR ><TR ><TD CLASS="decl" ><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Text-Show.html#t%3AShow" >Show</A > a => <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Text-Show.html#t%3AShow" >Show</A > (<A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a)</TD ></TR ><TR ><TD CLASS="decl" >(<A HREF="/usr/share/doc/ghc/html/libraries/template-haskell-2.4.0.0/Language-Haskell-TH-Syntax.html#t%3ALift" >Lift</A > a, Nat s) => <A HREF="/usr/share/doc/ghc/html/libraries/template-haskell-2.4.0.0/Language-Haskell-TH-Syntax.html#t%3ALift" >Lift</A > (<A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a)</TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:empty" ><A NAME="v%3Aempty" ></A ></A ><B >empty</B > :: <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > D0 a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#empty" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:+>" ><A NAME="v%3A%2B%3E" ></A ></A ><B >(+>)</B > :: (Nat s, Pos s', Succ s s') => a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s' a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#%2B%3E" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Cons operator, note it's not a constructor </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:singleton" ><A NAME="v%3Asingleton" ></A ></A ><B >singleton</B > :: a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > D1 a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#singleton" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >A FSVec with a single element </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:vectorCPS" ><A NAME="v%3AvectorCPS" ></A ></A ><B >vectorCPS</B > :: [a] -> (<SPAN CLASS="keyword" >forall</SPAN > s. Nat s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> w) -> w</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#vectorCPS" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Build a vector from a list (CPS style) </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:vectorTH" ><A NAME="v%3AvectorTH" ></A ></A ><B >vectorTH</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/template-haskell-2.4.0.0/Language-Haskell-TH-Syntax.html#t%3ALift" >Lift</A > a => [a] -> <A HREF="/usr/share/doc/ghc/html/libraries/template-haskell-2.4.0.0/Language-Haskell-TH-Lib.html#t%3AExpQ" >ExpQ</A ></TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#vectorTH" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Build a vector from a list (using Template Haskell) </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:unsafeVector" ><A NAME="v%3AunsafeVector" ></A ></A ><B >unsafeVector</B > :: Nat s => s -> [a] -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#unsafeVector" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Build a vector from a list (unsafe version: The static/dynamic size of the list is checked to match at runtime) </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:reallyUnsafeVector" ><A NAME="v%3AreallyUnsafeVector" ></A ></A ><B >reallyUnsafeVector</B > :: [a] -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#reallyUnsafeVector" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" ><P >Build a vector from a list. </P ><P >Unlike unsafeVector, reallyunsafeVector doesn't have access to the static size of the list and thus cannot not check it against its dynamic size (which saves traversing the list at runtime to obtain the dynamic length). </P ><P >Therefore, reallyUnsafeVector (the name is that long on purspose) can be used to gain some performance but may break the consistency of the size parameter if not handled with care (i.e. the size parameter can nolonger be checked statically and the fullfilment of function constraints is left to the programmers judgement). </P ><P >Do not use reallyUnsafeVector unless you know what you're doing! </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:readFSVec" ><A NAME="v%3AreadFSVec" ></A ></A ><B >readFSVec</B > :: (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Text-Read.html#t%3ARead" >Read</A > a, Nat s) => <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Char.html#t%3AString" >String</A > -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#readFSVec" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Read a vector (Note the the size of the vector string is checked to match the resulting type at runtime) </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:readFSVecCPS" ><A NAME="v%3AreadFSVecCPS" ></A ></A ><B >readFSVecCPS</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Text-Read.html#t%3ARead" >Read</A > a => <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Char.html#t%3AString" >String</A > -> (<SPAN CLASS="keyword" >forall</SPAN > s. Nat s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> w) -> w</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#readFSVecCPS" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Read a vector, CPS version. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:length" ><A NAME="v%3Alength" ></A ></A ><B >length</B > :: <SPAN CLASS="keyword" >forall</SPAN > s a. Nat s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A ></TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#length" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >value-level length of a vector </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:genericLength" ><A NAME="v%3AgenericLength" ></A ></A ><B >genericLength</B > :: <SPAN CLASS="keyword" >forall</SPAN > s a n. (Nat s, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Prelude.html#t%3ANum" >Num</A > n) => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> n</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#genericLength" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >generic value-level length of a vector </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:lengthT" ><A NAME="v%3AlengthT" ></A ></A ><B >lengthT</B > :: Nat s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> s</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#lengthT" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >type-level version of length </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:fromVector" ><A NAME="v%3AfromVector" ></A ></A ><B >fromVector</B > :: Nat s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> [a]</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#fromVector" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Transform Vector to a list </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:null" ><A NAME="v%3Anull" ></A ></A ><B >null</B > :: <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > D0 a -> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Bool.html#t%3ABool" >Bool</A ></TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#null" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Check if a Vector is empty </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:!" ><A NAME="v%3A%21" ></A ></A ><B >(!)</B > :: (Pos s, Nat i, i :<: s) => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> i -> a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#%21" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Access an element of a vector </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:replace" ><A NAME="v%3Areplace" ></A ></A ><B >replace</B > :: (Nat s, Nat i) => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> i -> a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#replace" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Replace an element of a vector </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:head" ><A NAME="v%3Ahead" ></A ></A ><B >head</B > :: Pos s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#head" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Take the first element of a vector </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:last" ><A NAME="v%3Alast" ></A ></A ><B >last</B > :: Pos s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#last" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Take the last element of a vector </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:init" ><A NAME="v%3Ainit" ></A ></A ><B >init</B > :: (Pos s, Succ s' s) => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s' a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#init" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Return all but the last element of a vector </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:tail" ><A NAME="v%3Atail" ></A ></A ><B >tail</B > :: (Pos s, Succ s' s) => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s' a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#tail" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Return all but the first element of a vector </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:take" ><A NAME="v%3Atake" ></A ></A ><B >take</B > :: (Nat i, Nat s, Min s i s') => i -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s' a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#take" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Take the first i elements of a vector </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:drop" ><A NAME="v%3Adrop" ></A ></A ><B >drop</B > :: (Nat i, Nat s, Min s i sm, Sub s sm s') => i -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s' a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#drop" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Drop the first i elements of a vector </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:select" ><A NAME="v%3Aselect" ></A ></A ><B >select</B > :: (Nat f, Nat s, Nat n, f :<: i, Mul s n smn, Add f smn fasmn, fasmn :<=: i) => f -> s -> n -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > i a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > n a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#select" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >The function <TT ><A HREF="Data-Param-FSVec.html#v%3Aselect" >select</A ></TT > selects elements in the vector. The first argument gives the initial element, starting from zero, the second argument gives the stepsize between elements and the last argument gives the number of elements. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:group" ><A NAME="v%3Agroup" ></A ></A ><B >group</B > :: (Pos n, Nat s, Div s n s') => n -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s' (<A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > n a)</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#group" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >break a vector into subvectors of size n. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:<+" ><A NAME="v%3A%3C%2B" ></A ></A ><B >(<+)</B > :: (Nat s, Pos s', Succ s s') => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s' a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#%3C%2B" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >add an element at the end of a vector. (Inverse of '(+>)') </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:++" ><A NAME="v%3A%2B%2B" ></A ></A ><B >(++)</B > :: (Nat s1, Nat s2, Add s1 s2 s3) => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s1 a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s2 a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s3 a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#%2B%2B" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Concatenate two vectors </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:map" ><A NAME="v%3Amap" ></A ></A ><B >map</B > :: Nat s => (a -> b) -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s b</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#map" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Apply a function on all elements of a vector </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:zipWith" ><A NAME="v%3AzipWith" ></A ></A ><B >zipWith</B > :: Nat s => (a -> b -> c) -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s b -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s c</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#zipWith" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Applies function pairwise on two vectors </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:foldl" ><A NAME="v%3Afoldl" ></A ></A ><B >foldl</B > :: Nat s => (a -> b -> a) -> a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s b -> a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#foldl" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Folds a function from the right to the left over a vector using an initial value. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:foldr" ><A NAME="v%3Afoldr" ></A ></A ><B >foldr</B > :: Nat s => (b -> a -> a) -> a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s b -> a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#foldr" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Folds a function from the left to the right over a vector using an initial value. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:zip" ><A NAME="v%3Azip" ></A ></A ><B >zip</B > :: Nat s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s b -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s (a, b)</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#zip" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >zip two vectors into a vector of tuples. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:unzip" ><A NAME="v%3Aunzip" ></A ></A ><B >unzip</B > :: Nat s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s (a, b) -> (<A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a, <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s b)</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#unzip" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >unzip a vector of tuples into two vectors. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:shiftl" ><A NAME="v%3Ashiftl" ></A ></A ><B >shiftl</B > :: Pos s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#shiftl" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >shift a value from the left into a vector. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:shiftr" ><A NAME="v%3Ashiftr" ></A ></A ><B >shiftr</B > :: Pos s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#shiftr" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >shift a value from the left into a vector. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:rotl" ><A NAME="v%3Arotl" ></A ></A ><B >rotl</B > :: <SPAN CLASS="keyword" >forall</SPAN > s a. Nat s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#rotl" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Rotate a vector to the left. Note that this fuctions does not change the size of a vector. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:rotr" ><A NAME="v%3Arotr" ></A ></A ><B >rotr</B > :: Nat s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#rotr" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >Rotate a vector to the left. Note that this fuctions does not change the size of a vector. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:concat" ><A NAME="v%3Aconcat" ></A ></A ><B >concat</B > :: (Nat s1, Nat s2, Nat s3, Mul s1 s2 s3) => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s1 (<A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s2 a) -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s3 a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#concat" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >flatten a vector of vectors to a single vector </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:reverse" ><A NAME="v%3Areverse" ></A ></A ><B >reverse</B > :: Nat s => <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#reverse" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" >reverse a vector </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:iterate" ><A NAME="v%3Aiterate" ></A ></A ><B >iterate</B > :: Nat s => s -> (a -> a) -> a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#iterate" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" ><P >generate a vector with a given number of elements starting from an initial element using a supplied function for the generation of elements. </P ><PRE > FSVec> iterate d5 (+1) 1 </PRE ><PRE > <1,2,3,4,5> :: Num a => FSVec D5 a </PRE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:generate" ><A NAME="v%3Agenerate" ></A ></A ><B >generate</B > :: Nat s => s -> (a -> a) -> a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#generate" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT ><A HREF="Data-Param-FSVec.html#v%3Agenerate" >generate</A ></TT > behaves in the same way as <TT ><A HREF="Data-Param-FSVec.html#v%3Aiterate" >iterate</A ></TT >, but starts with the application of the supplied function to the supplied value. </P ><PRE > FSVec> generate d5 (+1) 1 </PRE ><PRE > <2,3,4,5,6> :: Num a => FSVec D5 a </PRE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="topdecl" ><TABLE CLASS="declbar" ><TR ><TD CLASS="declname" ><A NAME="v:copy" ><A NAME="v%3Acopy" ></A ></A ><B >copy</B > :: Nat s => s -> a -> <A HREF="Data-Param-FSVec.html#t%3AFSVec" >FSVec</A > s a</TD ><TD CLASS="declbut" ><A HREF="src/Data-Param-FSVec.html#copy" >Source</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="doc" ><P >generates a vector with a given number of copies of the same element. </P ><PRE > FSVec> copy d7 5 </PRE ><PRE > <5,5,5,5,5,5,5> :: FSVec D7 Integer </PRE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="botbar" >Produced by <A HREF="http://www.haskell.org/haddock/" >Haddock</A > version 2.6.0</TD ></TR ></TABLE ></BODY ></HTML >