Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > c95396d39d65e8386d499c597a7865c8 > files > 139

ghc-vector-devel-0.9.1-8.fc18.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Data.Vector.Unboxed</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Data-Vector-Unboxed.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Vector-Unboxed.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">vector-0.9.1: Efficient Arrays</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>non-portable</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Roman Leshchinskiy &lt;rl@cse.unsw.edu.au&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Infered</td></tr></table><p class="caption">Data.Vector.Unboxed</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Unboxed vectors
</a></li><li><a href="#g:2">Accessors
</a><ul><li><a href="#g:3">Length information
</a></li><li><a href="#g:4">Indexing
</a></li><li><a href="#g:5">Monadic indexing
</a></li><li><a href="#g:6">Extracting subvectors (slicing)
</a></li></ul></li><li><a href="#g:7">Construction
</a><ul><li><a href="#g:8">Initialisation
</a></li><li><a href="#g:9">Monadic initialisation
</a></li><li><a href="#g:10">Unfolding
</a></li><li><a href="#g:11">Enumeration
</a></li><li><a href="#g:12">Concatenation
</a></li><li><a href="#g:13">Restricting memory usage
</a></li></ul></li><li><a href="#g:14">Modifying vectors
</a><ul><li><a href="#g:15">Bulk updates
</a></li><li><a href="#g:16">Accumulations
</a></li><li><a href="#g:17">Permutations 
</a></li><li><a href="#g:18">Safe destructive updates
</a></li></ul></li><li><a href="#g:19">Elementwise operations
</a><ul><li><a href="#g:20">Indexing
</a></li><li><a href="#g:21">Mapping
</a></li><li><a href="#g:22">Monadic mapping
</a></li><li><a href="#g:23">Zipping
</a></li><li><a href="#g:24">Monadic zipping
</a></li><li><a href="#g:25">Unzipping
</a></li></ul></li><li><a href="#g:26">Working with predicates
</a><ul><li><a href="#g:27">Filtering
</a></li><li><a href="#g:28">Partitioning
</a></li><li><a href="#g:29">Searching
</a></li></ul></li><li><a href="#g:30">Folding
</a><ul><li><a href="#g:31">Specialised folds
</a></li><li><a href="#g:32">Monadic folds
</a></li></ul></li><li><a href="#g:33">Prefix sums (scans)
</a></li><li><a href="#g:34">Conversions
</a><ul><li><a href="#g:35">Lists
</a></li><li><a href="#g:36">Other vector types
</a></li><li><a href="#g:37">Mutable vectors
</a></li></ul></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Adaptive unboxed vectors. The implementation is based on type families
 and picks an efficient, specialised representation for every element type.
 In particular, unboxed vectors of pairs are represented as pairs of unboxed
 vectors.
</p><p>Implementing unboxed vectors for new data types can be very easy. Here is
 how the library does this for <code>Complex</code> by simply wrapping vectors of
 pairs.
</p><pre>
 newtype instance <code><a href="Data-Vector-Unboxed.html#t:MVector">MVector</a></code> s (<code>Complex</code> a) = MV_Complex (<code><a href="Data-Vector-Unboxed.html#t:MVector">MVector</a></code> s (a,a))
 newtype instance <code><a href="Data-Vector-Unboxed.html#t:Vector">Vector</a></code>    (<code>Complex</code> a) = V_Complex  (<code><a href="Data-Vector-Unboxed.html#t:Vector">Vector</a></code>    (a,a))

instance (<code><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:RealFloat">RealFloat</a></code> a, <code><a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a></code> a) =&gt; <code><a href="Data-Vector-Generic-Mutable.html#t:MVector">MVector</a></code> <code><a href="Data-Vector-Unboxed.html#t:MVector">MVector</a></code> (<code>Complex</code> a) where
   {-# INLINE basicLength #-}
   basicLength (MV_Complex v) = <code><a href="Data-Vector-Generic-Mutable.html#v:basicLength">basicLength</a></code> v
   ...

instance (<code><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:RealFloat">RealFloat</a></code> a, <code><a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a></code> a) =&gt; Data.Vector.Generic.Vector <code><a href="Data-Vector-Unboxed.html#t:Vector">Vector</a></code> (<code>Complex</code> a) where
   {-# INLINE basicLength #-}
   basicLength (V_Complex v) = Data.Vector.Generic.basicLength v
   ...

instance (<code><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:RealFloat">RealFloat</a></code> a, <code><a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a></code> a) =&gt; <code><a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a></code> (<code>Complex</code> a)
</pre></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data family</span> <a href="#t:Vector">Vector</a> a </li><li class="src short"><span class="keyword">data family</span> <a href="#t:MVector">MVector</a> s a </li><li class="src short"><span class="keyword">class</span> (<a href="Data-Vector-Generic.html#t:Vector">Vector</a> <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Generic-Mutable.html#t:MVector">MVector</a> <a href="Data-Vector-Unboxed.html#t:MVector">MVector</a> a) =&gt; <a href="#t:Unbox">Unbox</a> a </li><li class="src short"><a href="#v:length">length</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:null">null</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:-33-">(!)</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a</li><li class="src short"><a href="#v:-33--63-">(!?)</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a</li><li class="src short"><a href="#v:head">head</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a</li><li class="src short"><a href="#v:last">last</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a</li><li class="src short"><a href="#v:unsafeIndex">unsafeIndex</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a</li><li class="src short"><a href="#v:unsafeHead">unsafeHead</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a</li><li class="src short"><a href="#v:unsafeLast">unsafeLast</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a</li><li class="src short"><a href="#v:indexM">indexM</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m a</li><li class="src short"><a href="#v:headM">headM</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m a</li><li class="src short"><a href="#v:lastM">lastM</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m a</li><li class="src short"><a href="#v:unsafeIndexM">unsafeIndexM</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m a</li><li class="src short"><a href="#v:unsafeHeadM">unsafeHeadM</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m a</li><li class="src short"><a href="#v:unsafeLastM">unsafeLastM</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m a</li><li class="src short"><a href="#v:slice">slice</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:init">init</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:tail">tail</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:take">take</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:drop">drop</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:splitAt">splitAt</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a)</li><li class="src short"><a href="#v:unsafeSlice">unsafeSlice</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:unsafeInit">unsafeInit</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:unsafeTail">unsafeTail</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:unsafeTake">unsafeTake</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:unsafeDrop">unsafeDrop</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:empty">empty</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:singleton">singleton</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:replicate">replicate</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:generate">generate</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:iterateN">iterateN</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; (a -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:replicateM">replicateM</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m a -&gt; m (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a)</li><li class="src short"><a href="#v:generateM">generateM</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m a) -&gt; m (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a)</li><li class="src short"><a href="#v:create">create</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (<span class="keyword">forall</span> s.  <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad-ST-Safe.html#t:ST">ST</a> s (<a href="Data-Vector-Unboxed.html#t:MVector">MVector</a> s a)) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:unfoldr">unfoldr</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (b -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (a, b)) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:unfoldrN">unfoldrN</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; (b -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (a, b)) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:constructN">constructN</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:constructrN">constructrN</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:enumFromN">enumFromN</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a) =&gt; a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:enumFromStepN">enumFromStepN</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a) =&gt; a -&gt; a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:enumFromTo">enumFromTo</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> a) =&gt; a -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:enumFromThenTo">enumFromThenTo</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> a) =&gt; a -&gt; a -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:cons">cons</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:snoc">snoc</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:-43--43-">(++)</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:concat">concat</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; [<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a] -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:force">force</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:-47--47-">(//)</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; [(<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a>, a)] -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:update">update</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a>, a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:update_">update_</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:unsafeUpd">unsafeUpd</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; [(<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a>, a)] -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:unsafeUpdate">unsafeUpdate</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a>, a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:unsafeUpdate_">unsafeUpdate_</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:accum">accum</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; b -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; [(<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a>, b)] -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:accumulate">accumulate</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a>, b) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:accumulate_">accumulate_</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:unsafeAccum">unsafeAccum</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; b -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; [(<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a>, b)] -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:unsafeAccumulate">unsafeAccumulate</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a>, b) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:unsafeAccumulate_">unsafeAccumulate_</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:reverse">reverse</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:backpermute">backpermute</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:unsafeBackpermute">unsafeBackpermute</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:modify">modify</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (<span class="keyword">forall</span> s.  <a href="Data-Vector-Unboxed.html#t:MVector">MVector</a> s a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad-ST-Safe.html#t:ST">ST</a> s <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:indexed">indexed</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a>, a)</li><li class="src short"><a href="#v:map">map</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b</li><li class="src short"><a href="#v:imap">imap</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; b) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b</li><li class="src short"><a href="#v:concatMap">concatMap</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b</li><li class="src short"><a href="#v:mapM">mapM</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; m b) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b)</li><li class="src short"><a href="#v:mapM_">mapM_</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a) =&gt; (a -&gt; m b) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:forM">forM</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; (a -&gt; m b) -&gt; m (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b)</li><li class="src short"><a href="#v:forM_">forM_</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; (a -&gt; m b) -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:zipWith">zipWith</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c) =&gt; (a -&gt; b -&gt; c) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c</li><li class="src short"><a href="#v:zipWith3">zipWith3</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d) =&gt; (a -&gt; b -&gt; c -&gt; d) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d</li><li class="src short"><a href="#v:zipWith4">zipWith4</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e) =&gt; (a -&gt; b -&gt; c -&gt; d -&gt; e) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> e</li><li class="src short"><a href="#v:zipWith5">zipWith5</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> f) =&gt; (a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> e -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> f</li><li class="src short"><a href="#v:zipWith6">zipWith6</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> f, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> g) =&gt; (a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> e -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> f -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> g</li><li class="src short"><a href="#v:izipWith">izipWith</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c) =&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; b -&gt; c) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c</li><li class="src short"><a href="#v:izipWith3">izipWith3</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d) =&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; b -&gt; c -&gt; d) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d</li><li class="src short"><a href="#v:izipWith4">izipWith4</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e) =&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; b -&gt; c -&gt; d -&gt; e) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> e</li><li class="src short"><a href="#v:izipWith5">izipWith5</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> f) =&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> e -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> f</li><li class="src short"><a href="#v:izipWith6">izipWith6</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> f, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> g) =&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> e -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> f -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> g</li><li class="src short"><a href="#v:zip">zip</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (a, b)</li><li class="src short"><a href="#v:zip3">zip3</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (a, b, c)</li><li class="src short"><a href="#v:zip4">zip4</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (a, b, c, d)</li><li class="src short"><a href="#v:zip5">zip5</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> e -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (a, b, c, d, e)</li><li class="src short"><a href="#v:zip6">zip6</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> f) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> e -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> f -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (a, b, c, d, e, f)</li><li class="src short"><a href="#v:zipWithM">zipWithM</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c) =&gt; (a -&gt; b -&gt; m c) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; m (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c)</li><li class="src short"><a href="#v:zipWithM_">zipWithM_</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; m c) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:unzip">unzip</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (a, b) -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b)</li><li class="src short"><a href="#v:unzip3">unzip3</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (a, b, c) -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c)</li><li class="src short"><a href="#v:unzip4">unzip4</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (a, b, c, d) -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d)</li><li class="src short"><a href="#v:unzip5">unzip5</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (a, b, c, d, e) -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> e)</li><li class="src short"><a href="#v:unzip6">unzip6</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> f) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (a, b, c, d, e, f) -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> e, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> f)</li><li class="src short"><a href="#v:filter">filter</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:ifilter">ifilter</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:filterM">filterM</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a) =&gt; (a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a)</li><li class="src short"><a href="#v:takeWhile">takeWhile</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:dropWhile">dropWhile</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:partition">partition</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a)</li><li class="src short"><a href="#v:unstablePartition">unstablePartition</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a)</li><li class="src short"><a href="#v:span">span</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a)</li><li class="src short"><a href="#v:break">break</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a)</li><li class="src short"><a href="#v:elem">elem</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> a) =&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:notElem">notElem</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> a) =&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:find">find</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a</li><li class="src short"><a href="#v:findIndex">findIndex</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:findIndices">findIndices</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:elemIndex">elemIndex</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> a) =&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:elemIndices">elemIndices</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> a) =&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:foldl">foldl</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b =&gt; (a -&gt; b -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; a</li><li class="src short"><a href="#v:foldl1">foldl1</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a</li><li class="src short"><a href="#v:foldl-39-">foldl'</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b =&gt; (a -&gt; b -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; a</li><li class="src short"><a href="#v:foldl1-39-">foldl1'</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a</li><li class="src short"><a href="#v:foldr">foldr</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; b</li><li class="src short"><a href="#v:foldr1">foldr1</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a</li><li class="src short"><a href="#v:foldr-39-">foldr'</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; b</li><li class="src short"><a href="#v:foldr1-39-">foldr1'</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a</li><li class="src short"><a href="#v:ifoldl">ifoldl</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; b -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; a</li><li class="src short"><a href="#v:ifoldl-39-">ifoldl'</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; b -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; a</li><li class="src short"><a href="#v:ifoldr">ifoldr</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; b</li><li class="src short"><a href="#v:ifoldr-39-">ifoldr'</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; b</li><li class="src short"><a href="#v:all">all</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:any">any</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:and">and</a> :: <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:or">or</a> :: <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:sum">sum</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a</li><li class="src short"><a href="#v:product">product</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a</li><li class="src short"><a href="#v:maximum">maximum</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> a) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a</li><li class="src short"><a href="#v:maximumBy">maximumBy</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ordering">Ordering</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a</li><li class="src short"><a href="#v:minimum">minimum</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> a) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a</li><li class="src short"><a href="#v:minimumBy">minimumBy</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ordering">Ordering</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a</li><li class="src short"><a href="#v:minIndex">minIndex</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> a) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:minIndexBy">minIndexBy</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ordering">Ordering</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:maxIndex">maxIndex</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> a) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:maxIndexBy">maxIndexBy</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ordering">Ordering</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:foldM">foldM</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; m a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; m a</li><li class="src short"><a href="#v:foldM-39-">foldM'</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; m a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; m a</li><li class="src short"><a href="#v:fold1M">fold1M</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a) =&gt; (a -&gt; a -&gt; m a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m a</li><li class="src short"><a href="#v:fold1M-39-">fold1M'</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a) =&gt; (a -&gt; a -&gt; m a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m a</li><li class="src short"><a href="#v:foldM_">foldM_</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; m a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:foldM-39-_">foldM'_</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; m a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:fold1M_">fold1M_</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a) =&gt; (a -&gt; a -&gt; m a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:fold1M-39-_">fold1M'_</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a) =&gt; (a -&gt; a -&gt; m a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:prescanl">prescanl</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:prescanl-39-">prescanl'</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:postscanl">postscanl</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:postscanl-39-">postscanl'</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:scanl">scanl</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:scanl-39-">scanl'</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:scanl1">scanl1</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:scanl1-39-">scanl1'</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:prescanr">prescanr</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b</li><li class="src short"><a href="#v:prescanr-39-">prescanr'</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b</li><li class="src short"><a href="#v:postscanr">postscanr</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b</li><li class="src short"><a href="#v:postscanr-39-">postscanr'</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b</li><li class="src short"><a href="#v:scanr">scanr</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b</li><li class="src short"><a href="#v:scanr-39-">scanr'</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b</li><li class="src short"><a href="#v:scanr1">scanr1</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:scanr1-39-">scanr1'</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:toList">toList</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; [a]</li><li class="src short"><a href="#v:fromList">fromList</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; [a] -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:fromListN">fromListN</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; [a] -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</li><li class="src short"><a href="#v:convert">convert</a> :: (<a href="Data-Vector-Generic.html#t:Vector">Vector</a> v a, <a href="Data-Vector-Generic.html#t:Vector">Vector</a> w a) =&gt; v a -&gt; w a</li><li class="src short"><a href="#v:freeze">freeze</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; m (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a)</li><li class="src short"><a href="#v:thaw">thaw</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m (<a href="Data-Vector-Unboxed.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a)</li><li class="src short"><a href="#v:copy">copy</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:unsafeFreeze">unsafeFreeze</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; m (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a)</li><li class="src short"><a href="#v:unsafeThaw">unsafeThaw</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m (<a href="Data-Vector-Unboxed.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a)</li><li class="src short"><a href="#v:unsafeCopy">unsafeCopy</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li></ul></div><div id="interface"><h1 id="g:1">Unboxed vectors
</h1><div class="top"><p class="src"><span class="keyword">data family</span> <a name="t:Vector" class="def">Vector</a> a <a href="src/Data-Vector-Unboxed-Base.html#Vector" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">data family</span> <a name="t:MVector" class="def">MVector</a> s a <a href="src/Data-Vector-Unboxed-Base.html#MVector" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Data-Vector-Generic.html#t:Vector">Vector</a> <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Generic-Mutable.html#t:MVector">MVector</a> <a href="Data-Vector-Unboxed.html#t:MVector">MVector</a> a) =&gt; <a name="t:Unbox" class="def">Unbox</a> a <a href="src/Data-Vector-Unboxed-Base.html#Unbox" class="link">Source</a></p><div class="subs instances"><p id="control.i:Unbox" class="caption collapser" onclick="toggleSection('i:Unbox')">Instances</p><div id="section.i:Unbox" class="show"><table><tr><td class="src"><a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Char.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int8">Int8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int16">Int16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int32">Int32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int64">Int64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Word.html#t:Word">Word</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Word.html#t:Word8">Word8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Word.html#t:Word16">Word16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Word.html#t:Word32">Word32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Word.html#t:Word64">Word64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> ()</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:RealFloat">RealFloat</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Complex.html#t:Complex">Complex</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> (a, b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c) =&gt; <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> (a, b, c)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d) =&gt; <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> (a, b, c, d)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e) =&gt; <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> (a, b, c, d, e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> f) =&gt; <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> (a, b, c, d, e, f)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:2">Accessors
</h1><h2 id="g:3">Length information
</h2><div class="top"><p class="src"><a name="v:length" class="def">length</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a><a href="src/Data-Vector-Unboxed.html#length" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Yield the length of the vector.
</p></div></div><div class="top"><p class="src"><a name="v:null" class="def">null</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-Vector-Unboxed.html#null" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Test whether a vector if empty
</p></div></div><h2 id="g:4">Indexing
</h2><div class="top"><p class="src"><a name="v:-33-" class="def">(!)</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a<a href="src/Data-Vector-Unboxed.html#%21" class="link">Source</a></p><div class="doc"><p>O(1) Indexing
</p></div></div><div class="top"><p class="src"><a name="v:-33--63-" class="def">(!?)</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a<a href="src/Data-Vector-Unboxed.html#%21%3F" class="link">Source</a></p><div class="doc"><p>O(1) Safe indexing
</p></div></div><div class="top"><p class="src"><a name="v:head" class="def">head</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a<a href="src/Data-Vector-Unboxed.html#head" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> First element
</p></div></div><div class="top"><p class="src"><a name="v:last" class="def">last</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a<a href="src/Data-Vector-Unboxed.html#last" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Last element
</p></div></div><div class="top"><p class="src"><a name="v:unsafeIndex" class="def">unsafeIndex</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a<a href="src/Data-Vector-Unboxed.html#unsafeIndex" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Unsafe indexing without bounds checking
</p></div></div><div class="top"><p class="src"><a name="v:unsafeHead" class="def">unsafeHead</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a<a href="src/Data-Vector-Unboxed.html#unsafeHead" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> First element without checking if the vector is empty
</p></div></div><div class="top"><p class="src"><a name="v:unsafeLast" class="def">unsafeLast</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a<a href="src/Data-Vector-Unboxed.html#unsafeLast" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Last element without checking if the vector is empty
</p></div></div><h2 id="g:5">Monadic indexing
</h2><div class="top"><p class="src"><a name="v:indexM" class="def">indexM</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m a<a href="src/Data-Vector-Unboxed.html#indexM" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Indexing in a monad.
</p><p>The monad allows operations to be strict in the vector when necessary.
 Suppose vector copying is implemented like this:
</p><pre> copy mv v = ... write mv i (v ! i) ...
</pre><p>For lazy vectors, <code>v ! i</code> would not be evaluated which means that <code>mv</code>
 would unnecessarily retain a reference to <code>v</code> in each element written.
</p><p>With <code><a href="Data-Vector-Unboxed.html#v:indexM">indexM</a></code>, copying can be implemented like this instead:
</p><pre> copy mv v = ... do
                   x &lt;- indexM v i
                   write mv i x
</pre><p>Here, no references to <code>v</code> are retained because indexing (but <em>not</em> the
 elements) is evaluated eagerly.
</p></div></div><div class="top"><p class="src"><a name="v:headM" class="def">headM</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m a<a href="src/Data-Vector-Unboxed.html#headM" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> First element of a vector in a monad. See <code><a href="Data-Vector-Unboxed.html#v:indexM">indexM</a></code> for an
 explanation of why this is useful.
</p></div></div><div class="top"><p class="src"><a name="v:lastM" class="def">lastM</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m a<a href="src/Data-Vector-Unboxed.html#lastM" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Last element of a vector in a monad. See <code><a href="Data-Vector-Unboxed.html#v:indexM">indexM</a></code> for an
 explanation of why this is useful.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeIndexM" class="def">unsafeIndexM</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m a<a href="src/Data-Vector-Unboxed.html#unsafeIndexM" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Indexing in a monad without bounds checks. See <code><a href="Data-Vector-Unboxed.html#v:indexM">indexM</a></code> for an
 explanation of why this is useful.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeHeadM" class="def">unsafeHeadM</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m a<a href="src/Data-Vector-Unboxed.html#unsafeHeadM" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> First element in a monad without checking for empty vectors.
 See <code><a href="Data-Vector-Unboxed.html#v:indexM">indexM</a></code> for an explanation of why this is useful.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeLastM" class="def">unsafeLastM</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m a<a href="src/Data-Vector-Unboxed.html#unsafeLastM" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Last element in a monad without checking for empty vectors.
 See <code><a href="Data-Vector-Unboxed.html#v:indexM">indexM</a></code> for an explanation of why this is useful.
</p></div></div><h2 id="g:6">Extracting subvectors (slicing)
</h2><div class="top"><p class="src"><a name="v:slice" class="def">slice</a><a href="src/Data-Vector-Unboxed.html#slice" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p><code>i</code> starting index
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p><code>n</code> length
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p><em>O(1)</em> Yield a slice of the vector without copying it. The vector must
 contain at least <code>i+n</code> elements.
</p></div></div><div class="top"><p class="src"><a name="v:init" class="def">init</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#init" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Yield all but the last element without copying. The vector may not
 be empty.
</p></div></div><div class="top"><p class="src"><a name="v:tail" class="def">tail</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#tail" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Yield all but the first element without copying. The vector may not
 be empty.
</p></div></div><div class="top"><p class="src"><a name="v:take" class="def">take</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#take" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Yield at the first <code>n</code> elements without copying. The vector may
 contain less than <code>n</code> elements in which case it is returned unchanged.
</p></div></div><div class="top"><p class="src"><a name="v:drop" class="def">drop</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#drop" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Yield all but the first <code>n</code> elements without copying. The vector may
 contain less than <code>n</code> elements in which case an empty vector is returned.
</p></div></div><div class="top"><p class="src"><a name="v:splitAt" class="def">splitAt</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a)<a href="src/Data-Vector-Unboxed.html#splitAt" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Yield the first <code>n</code> elements paired with the remainder without copying.
</p><p>Note that <code><code><a href="Data-Vector-Unboxed.html#v:splitAt">splitAt</a></code> n v</code> is equivalent to <code>(<code><a href="Data-Vector-Unboxed.html#v:take">take</a></code> n v, <code><a href="Data-Vector-Unboxed.html#v:drop">drop</a></code> n v)</code>
 but slightly more efficient.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeSlice" class="def">unsafeSlice</a><a href="src/Data-Vector-Unboxed.html#unsafeSlice" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p><code>i</code> starting index
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p><code>n</code> length
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p><em>O(1)</em> Yield a slice of the vector without copying. The vector must
 contain at least <code>i+n</code> elements but this is not checked.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeInit" class="def">unsafeInit</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#unsafeInit" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Yield all but the last element without copying. The vector may not
 be empty but this is not checked.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeTail" class="def">unsafeTail</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#unsafeTail" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Yield all but the first element without copying. The vector may not
 be empty but this is not checked.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeTake" class="def">unsafeTake</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#unsafeTake" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Yield the first <code>n</code> elements without copying. The vector must
 contain at least <code>n</code> elements but this is not checked.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeDrop" class="def">unsafeDrop</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#unsafeDrop" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Yield all but the first <code>n</code> elements without copying. The vector
 must contain at least <code>n</code> elements but this is not checked.
</p></div></div><h1 id="g:7">Construction
</h1><h2 id="g:8">Initialisation
</h2><div class="top"><p class="src"><a name="v:empty" class="def">empty</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#empty" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Empty vector
</p></div></div><div class="top"><p class="src"><a name="v:singleton" class="def">singleton</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#singleton" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Vector with exactly one element
</p></div></div><div class="top"><p class="src"><a name="v:replicate" class="def">replicate</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#replicate" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Vector of the given length with the same value in each position
</p></div></div><div class="top"><p class="src"><a name="v:generate" class="def">generate</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#generate" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Construct a vector of the given length by applying the function to
 each index
</p></div></div><div class="top"><p class="src"><a name="v:iterateN" class="def">iterateN</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; (a -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#iterateN" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Apply function n times to value. Zeroth element is original value.
</p></div></div><h2 id="g:9">Monadic initialisation
</h2><div class="top"><p class="src"><a name="v:replicateM" class="def">replicateM</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m a -&gt; m (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a)<a href="src/Data-Vector-Unboxed.html#replicateM" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Execute the monadic action the given number of times and store the
 results in a vector.
</p></div></div><div class="top"><p class="src"><a name="v:generateM" class="def">generateM</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; m a) -&gt; m (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a)<a href="src/Data-Vector-Unboxed.html#generateM" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Construct a vector of the given length by applying the monadic
 action to each index
</p></div></div><div class="top"><p class="src"><a name="v:create" class="def">create</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (<span class="keyword">forall</span> s.  <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad-ST-Safe.html#t:ST">ST</a> s (<a href="Data-Vector-Unboxed.html#t:MVector">MVector</a> s a)) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#create" class="link">Source</a></p><div class="doc"><p>Execute the monadic action and freeze the resulting vector.
</p><pre>
 create (do { v &lt;- new 2; write v 0 'a'; write v 1 'b' }) = &lt;<code>a</code>,<code>b</code>&gt;
</pre></div></div><h2 id="g:10">Unfolding
</h2><div class="top"><p class="src"><a name="v:unfoldr" class="def">unfoldr</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (b -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (a, b)) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#unfoldr" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Construct a vector by repeatedly applying the generator function
 to a seed. The generator function yields <code><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#v:Just">Just</a></code> the next element and the
 new seed or <code><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code> if there are no more elements.
</p><pre> unfoldr (\n -&gt; if n == 0 then Nothing else Just (n,n-1)) 10
  = &lt;10,9,8,7,6,5,4,3,2,1&gt;
</pre></div></div><div class="top"><p class="src"><a name="v:unfoldrN" class="def">unfoldrN</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; (b -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (a, b)) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#unfoldrN" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Construct a vector with at most <code>n</code> by repeatedly applying the
 generator function to the a seed. The generator function yields <code><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#v:Just">Just</a></code> the
 next element and the new seed or <code><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code> if there are no more elements.
</p><pre> unfoldrN 3 (\n -&gt; Just (n,n-1)) 10 = &lt;10,9,8&gt;
</pre></div></div><div class="top"><p class="src"><a name="v:constructN" class="def">constructN</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#constructN" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Construct a vector with <code>n</code> elements by repeatedly applying the
 generator function to the already constructed part of the vector.
</p><pre> constructN 3 f = let a = f &lt;&gt; ; b = f &lt;a&gt; ; c = f &lt;a,b&gt; in f &lt;a,b,c&gt;
</pre></div></div><div class="top"><p class="src"><a name="v:constructrN" class="def">constructrN</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#constructrN" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Construct a vector with <code>n</code> elements from right to left by
 repeatedly applying the generator function to the already constructed part
 of the vector.
</p><pre> constructrN 3 f = let a = f &lt;&gt; ; b = f&lt;a&gt; ; c = f &lt;b,a&gt; in f &lt;c,b,a&gt;
</pre></div></div><h2 id="g:11">Enumeration
</h2><div class="top"><p class="src"><a name="v:enumFromN" class="def">enumFromN</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a) =&gt; a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#enumFromN" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Yield a vector of the given length containing the values <code>x</code>, <code>x+1</code>
 etc. This operation is usually more efficient than <code><a href="Data-Vector-Unboxed.html#v:enumFromTo">enumFromTo</a></code>.
</p><pre> enumFromN 5 3 = &lt;5,6,7&gt;
</pre></div></div><div class="top"><p class="src"><a name="v:enumFromStepN" class="def">enumFromStepN</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a) =&gt; a -&gt; a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#enumFromStepN" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Yield a vector of the given length containing the values <code>x</code>, <code>x+y</code>,
 <code>x+y+y</code> etc. This operations is usually more efficient than <code><a href="Data-Vector-Unboxed.html#v:enumFromThenTo">enumFromThenTo</a></code>.
</p><pre> enumFromStepN 1 0.1 5 = &lt;1,1.1,1.2,1.3,1.4&gt;
</pre></div></div><div class="top"><p class="src"><a name="v:enumFromTo" class="def">enumFromTo</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> a) =&gt; a -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#enumFromTo" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Enumerate values from <code>x</code> to <code>y</code>.
</p><p><em>WARNING:</em> This operation can be very inefficient. If at all possible, use
 <code><a href="Data-Vector-Unboxed.html#v:enumFromN">enumFromN</a></code> instead.
</p></div></div><div class="top"><p class="src"><a name="v:enumFromThenTo" class="def">enumFromThenTo</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> a) =&gt; a -&gt; a -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#enumFromThenTo" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Enumerate values from <code>x</code> to <code>y</code> with a specific step <code>z</code>.
</p><p><em>WARNING:</em> This operation can be very inefficient. If at all possible, use
 <code><a href="Data-Vector-Unboxed.html#v:enumFromStepN">enumFromStepN</a></code> instead.
</p></div></div><h2 id="g:12">Concatenation
</h2><div class="top"><p class="src"><a name="v:cons" class="def">cons</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#cons" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Prepend an element
</p></div></div><div class="top"><p class="src"><a name="v:snoc" class="def">snoc</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#snoc" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Append an element
</p></div></div><div class="top"><p class="src"><a name="v:-43--43-" class="def">(++)</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#%2B%2B" class="link">Source</a></p><div class="doc"><p><em>O(m+n)</em> Concatenate two vectors
</p></div></div><div class="top"><p class="src"><a name="v:concat" class="def">concat</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; [<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a] -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#concat" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Concatenate all vectors in the list
</p></div></div><h2 id="g:13">Restricting memory usage
</h2><div class="top"><p class="src"><a name="v:force" class="def">force</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#force" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Yield the argument but force it not to retain any extra memory,
 possibly by copying it.
</p><p>This is especially useful when dealing with slices. For example:
</p><pre> force (slice 0 2 &lt;huge vector&gt;)
</pre><p>Here, the slice retains a reference to the huge vector. Forcing it creates
 a copy of just the elements that belong to the slice and allows the huge
 vector to be garbage collected.
</p></div></div><h1 id="g:14">Modifying vectors
</h1><h2 id="g:15">Bulk updates
</h2><div class="top"><p class="src"><a name="v:-47--47-" class="def">(//)</a><a href="src/Data-Vector-Unboxed.html#%2F%2F" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</td><td class="doc"><p>initial vector (of length <code>m</code>)
</p></td></tr><tr><td class="src">-&gt; [(<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a>, a)]</td><td class="doc"><p>list of index/value pairs (of length <code>n</code>) 
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p><em>O(m+n)</em> For each pair <code>(i,a)</code> from the list, replace the vector
 element at position <code>i</code> by <code>a</code>.
</p><pre> &lt;5,9,2,7&gt; // [(2,1),(0,3),(2,8)] = &lt;3,9,8,7&gt;
</pre></div></div><div class="top"><p class="src"><a name="v:update" class="def">update</a><a href="src/Data-Vector-Unboxed.html#update" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</td><td class="doc"><p>initial vector (of length <code>m</code>)
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a>, a)</td><td class="doc"><p>vector of index/value pairs (of length <code>n</code>)
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p><em>O(m+n)</em> For each pair <code>(i,a)</code> from the vector of index/value pairs,
 replace the vector element at position <code>i</code> by <code>a</code>.
</p><pre> update &lt;5,9,2,7&gt; &lt;(2,1),(0,3),(2,8)&gt; = &lt;3,9,8,7&gt;
</pre></div></div><div class="top"><p class="src"><a name="v:update_" class="def">update_</a><a href="src/Data-Vector-Unboxed.html#update_" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</td><td class="doc"><p>initial vector (of length <code>m</code>)
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>index vector (of length <code>n1</code>)
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</td><td class="doc"><p>value vector (of length <code>n2</code>)
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p><em>O(m+min(n1,n2))</em> For each index <code>i</code> from the index vector and the
 corresponding value <code>a</code> from the value vector, replace the element of the
 initial vector at position <code>i</code> by <code>a</code>.
</p><pre> update_ &lt;5,9,2,7&gt;  &lt;2,0,2&gt; &lt;1,3,8&gt; = &lt;3,9,8,7&gt;
</pre><p>The function <code><a href="Data-Vector-Unboxed.html#v:update">update</a></code> provides the same functionality and is usually more
 convenient.
</p><pre>
 update_ xs is ys = <code><a href="Data-Vector-Unboxed.html#v:update">update</a></code> xs (<code><a href="Data-Vector-Unboxed.html#v:zip">zip</a></code> is ys)
</pre></div></div><div class="top"><p class="src"><a name="v:unsafeUpd" class="def">unsafeUpd</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; [(<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a>, a)] -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#unsafeUpd" class="link">Source</a></p><div class="doc"><p>Same as (<code><a href="Data-Vector-Unboxed.html#v:-47--47-">//</a></code>) but without bounds checking.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeUpdate" class="def">unsafeUpdate</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a>, a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#unsafeUpdate" class="link">Source</a></p><div class="doc"><p>Same as <code><a href="Data-Vector-Unboxed.html#v:update">update</a></code> but without bounds checking.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeUpdate_" class="def">unsafeUpdate_</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#unsafeUpdate_" class="link">Source</a></p><div class="doc"><p>Same as <code><a href="Data-Vector-Unboxed.html#v:update_">update_</a></code> but without bounds checking.
</p></div></div><h2 id="g:16">Accumulations
</h2><div class="top"><p class="src"><a name="v:accum" class="def">accum</a><a href="src/Data-Vector-Unboxed.html#accum" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; (a -&gt; b -&gt; a)</td><td class="doc"><p>accumulating function <code>f</code>
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</td><td class="doc"><p>initial vector (of length <code>m</code>)
</p></td></tr><tr><td class="src">-&gt; [(<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a>, b)]</td><td class="doc"><p>list of index/value pairs (of length <code>n</code>)
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p><em>O(m+n)</em> For each pair <code>(i,b)</code> from the list, replace the vector element
 <code>a</code> at position <code>i</code> by <code>f a b</code>.
</p><pre> accum (+) &lt;5,9,2&gt; [(2,4),(1,6),(0,3),(1,7)] = &lt;5+3, 9+6+7, 2+4&gt;
</pre></div></div><div class="top"><p class="src"><a name="v:accumulate" class="def">accumulate</a><a href="src/Data-Vector-Unboxed.html#accumulate" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; (a -&gt; b -&gt; a)</td><td class="doc"><p>accumulating function <code>f</code>
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</td><td class="doc"><p>initial vector (of length <code>m</code>)
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a>, b)</td><td class="doc"><p>vector of index/value pairs (of length <code>n</code>)
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p><em>O(m+n)</em> For each pair <code>(i,b)</code> from the vector of pairs, replace the vector
 element <code>a</code> at position <code>i</code> by <code>f a b</code>.
</p><pre> accumulate (+) &lt;5,9,2&gt; &lt;(2,4),(1,6),(0,3),(1,7)&gt; = &lt;5+3, 9+6+7, 2+4&gt;
</pre></div></div><div class="top"><p class="src"><a name="v:accumulate_" class="def">accumulate_</a><a href="src/Data-Vector-Unboxed.html#accumulate_" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; (a -&gt; b -&gt; a)</td><td class="doc"><p>accumulating function <code>f</code>
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</td><td class="doc"><p>initial vector (of length <code>m</code>)
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>index vector (of length <code>n1</code>)
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b</td><td class="doc"><p>value vector (of length <code>n2</code>)
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p><em>O(m+min(n1,n2))</em> For each index <code>i</code> from the index vector and the
 corresponding value <code>b</code> from the the value vector,
 replace the element of the initial vector at
 position <code>i</code> by <code>f a b</code>.
</p><pre> accumulate_ (+) &lt;5,9,2&gt; &lt;2,1,0,1&gt; &lt;4,6,3,7&gt; = &lt;5+3, 9+6+7, 2+4&gt;
</pre><p>The function <code><a href="Data-Vector-Unboxed.html#v:accumulate">accumulate</a></code> provides the same functionality and is usually more
 convenient.
</p><pre>
 accumulate_ f as is bs = <code><a href="Data-Vector-Unboxed.html#v:accumulate">accumulate</a></code> f as (<code><a href="Data-Vector-Unboxed.html#v:zip">zip</a></code> is bs)
</pre></div></div><div class="top"><p class="src"><a name="v:unsafeAccum" class="def">unsafeAccum</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; b -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; [(<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a>, b)] -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#unsafeAccum" class="link">Source</a></p><div class="doc"><p>Same as <code><a href="Data-Vector-Unboxed.html#v:accum">accum</a></code> but without bounds checking.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeAccumulate" class="def">unsafeAccumulate</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a>, b) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#unsafeAccumulate" class="link">Source</a></p><div class="doc"><p>Same as <code><a href="Data-Vector-Unboxed.html#v:accumulate">accumulate</a></code> but without bounds checking.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeAccumulate_" class="def">unsafeAccumulate_</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#unsafeAccumulate_" class="link">Source</a></p><div class="doc"><p>Same as <code><a href="Data-Vector-Unboxed.html#v:accumulate_">accumulate_</a></code> but without bounds checking.
</p></div></div><h2 id="g:17">Permutations 
</h2><div class="top"><p class="src"><a name="v:reverse" class="def">reverse</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#reverse" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Reverse a vector
</p></div></div><div class="top"><p class="src"><a name="v:backpermute" class="def">backpermute</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#backpermute" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Yield the vector obtained by replacing each element <code>i</code> of the
 index vector by <code>xs<code><a href="Data-Vector-Unboxed.html#v:-33-">!</a></code>i</code>. This is equivalent to <code><code><a href="Data-Vector-Unboxed.html#v:map">map</a></code> (xs<code><a href="Data-Vector-Unboxed.html#v:-33-">!</a></code>) is</code> but is
 often much more efficient.
</p><pre> backpermute &lt;a,b,c,d&gt; &lt;0,3,2,3,1,0&gt; = &lt;a,d,c,d,b,a&gt;
</pre></div></div><div class="top"><p class="src"><a name="v:unsafeBackpermute" class="def">unsafeBackpermute</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#unsafeBackpermute" class="link">Source</a></p><div class="doc"><p>Same as <code><a href="Data-Vector-Unboxed.html#v:backpermute">backpermute</a></code> but without bounds checking.
</p></div></div><h2 id="g:18">Safe destructive updates
</h2><div class="top"><p class="src"><a name="v:modify" class="def">modify</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (<span class="keyword">forall</span> s.  <a href="Data-Vector-Unboxed.html#t:MVector">MVector</a> s a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad-ST-Safe.html#t:ST">ST</a> s <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#modify" class="link">Source</a></p><div class="doc"><p>Apply a destructive operation to a vector. The operation will be
 performed in place if it is safe to do so and will modify a copy of the
 vector otherwise.
</p><pre>
 modify (\v -&gt; write v 0 'x') (<code><a href="Data-Vector-Unboxed.html#v:replicate">replicate</a></code> 3 'a') = &lt;'x','a','a'&gt;
</pre></div></div><h1 id="g:19">Elementwise operations
</h1><h2 id="g:20">Indexing
</h2><div class="top"><p class="src"><a name="v:indexed" class="def">indexed</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a>, a)<a href="src/Data-Vector-Unboxed.html#indexed" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Pair each element in a vector with its index
</p></div></div><h2 id="g:21">Mapping
</h2><div class="top"><p class="src"><a name="v:map" class="def">map</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b<a href="src/Data-Vector-Unboxed.html#map" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Map a function over a vector
</p></div></div><div class="top"><p class="src"><a name="v:imap" class="def">imap</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; b) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b<a href="src/Data-Vector-Unboxed.html#imap" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Apply a function to every element of a vector and its index
</p></div></div><div class="top"><p class="src"><a name="v:concatMap" class="def">concatMap</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b<a href="src/Data-Vector-Unboxed.html#concatMap" class="link">Source</a></p><div class="doc"><p>Map a function over a vector and concatenate the results.
</p></div></div><h2 id="g:22">Monadic mapping
</h2><div class="top"><p class="src"><a name="v:mapM" class="def">mapM</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; m b) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b)<a href="src/Data-Vector-Unboxed.html#mapM" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Apply the monadic action to all elements of the vector, yielding a
 vector of results
</p></div></div><div class="top"><p class="src"><a name="v:mapM_" class="def">mapM_</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a) =&gt; (a -&gt; m b) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Data-Vector-Unboxed.html#mapM_" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Apply the monadic action to all elements of a vector and ignore the
 results
</p></div></div><div class="top"><p class="src"><a name="v:forM" class="def">forM</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; (a -&gt; m b) -&gt; m (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b)<a href="src/Data-Vector-Unboxed.html#forM" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Apply the monadic action to all elements of the vector, yielding a
 vector of results. Equvalent to <code>flip <code><a href="Data-Vector-Unboxed.html#v:mapM">mapM</a></code></code>.
</p></div></div><div class="top"><p class="src"><a name="v:forM_" class="def">forM_</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; (a -&gt; m b) -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Data-Vector-Unboxed.html#forM_" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Apply the monadic action to all elements of a vector and ignore the
 results. Equivalent to <code>flip <code><a href="Data-Vector-Unboxed.html#v:mapM_">mapM_</a></code></code>.
</p></div></div><h2 id="g:23">Zipping
</h2><div class="top"><p class="src"><a name="v:zipWith" class="def">zipWith</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c) =&gt; (a -&gt; b -&gt; c) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c<a href="src/Data-Vector-Unboxed.html#zipWith" class="link">Source</a></p><div class="doc"><p><em>O(min(m,n))</em> Zip two vectors with the given function.
</p></div></div><div class="top"><p class="src"><a name="v:zipWith3" class="def">zipWith3</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d) =&gt; (a -&gt; b -&gt; c -&gt; d) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d<a href="src/Data-Vector-Unboxed.html#zipWith3" class="link">Source</a></p><div class="doc"><p>Zip three vectors with the given function.
</p></div></div><div class="top"><p class="src"><a name="v:zipWith4" class="def">zipWith4</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e) =&gt; (a -&gt; b -&gt; c -&gt; d -&gt; e) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> e<a href="src/Data-Vector-Unboxed.html#zipWith4" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:zipWith5" class="def">zipWith5</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> f) =&gt; (a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> e -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> f<a href="src/Data-Vector-Unboxed.html#zipWith5" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:zipWith6" class="def">zipWith6</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> f, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> g) =&gt; (a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> e -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> f -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> g<a href="src/Data-Vector-Unboxed.html#zipWith6" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:izipWith" class="def">izipWith</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c) =&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; b -&gt; c) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c<a href="src/Data-Vector-Unboxed.html#izipWith" class="link">Source</a></p><div class="doc"><p><em>O(min(m,n))</em> Zip two vectors with a function that also takes the
 elements' indices.
</p></div></div><div class="top"><p class="src"><a name="v:izipWith3" class="def">izipWith3</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d) =&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; b -&gt; c -&gt; d) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d<a href="src/Data-Vector-Unboxed.html#izipWith3" class="link">Source</a></p><div class="doc"><p>Zip three vectors and their indices with the given function.
</p></div></div><div class="top"><p class="src"><a name="v:izipWith4" class="def">izipWith4</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e) =&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; b -&gt; c -&gt; d -&gt; e) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> e<a href="src/Data-Vector-Unboxed.html#izipWith4" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:izipWith5" class="def">izipWith5</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> f) =&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> e -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> f<a href="src/Data-Vector-Unboxed.html#izipWith5" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:izipWith6" class="def">izipWith6</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> f, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> g) =&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; b -&gt; c -&gt; d -&gt; e -&gt; f -&gt; g) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> e -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> f -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> g<a href="src/Data-Vector-Unboxed.html#izipWith6" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:zip" class="def">zip</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (a, b)<a href="src/Data-Vector-Unboxed.html#zip" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Zip 2 vectors
</p></div></div><div class="top"><p class="src"><a name="v:zip3" class="def">zip3</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (a, b, c)<a href="src/Data-Vector-Unboxed.html#zip3" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Zip 3 vectors
</p></div></div><div class="top"><p class="src"><a name="v:zip4" class="def">zip4</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (a, b, c, d)<a href="src/Data-Vector-Unboxed.html#zip4" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Zip 4 vectors
</p></div></div><div class="top"><p class="src"><a name="v:zip5" class="def">zip5</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> e -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (a, b, c, d, e)<a href="src/Data-Vector-Unboxed.html#zip5" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Zip 5 vectors
</p></div></div><div class="top"><p class="src"><a name="v:zip6" class="def">zip6</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> f) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> e -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> f -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (a, b, c, d, e, f)<a href="src/Data-Vector-Unboxed.html#zip6" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Zip 6 vectors
</p></div></div><h2 id="g:24">Monadic zipping
</h2><div class="top"><p class="src"><a name="v:zipWithM" class="def">zipWithM</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c) =&gt; (a -&gt; b -&gt; m c) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; m (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c)<a href="src/Data-Vector-Unboxed.html#zipWithM" class="link">Source</a></p><div class="doc"><p><em>O(min(m,n))</em> Zip the two vectors with the monadic action and yield a
 vector of results
</p></div></div><div class="top"><p class="src"><a name="v:zipWithM_" class="def">zipWithM_</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; m c) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Data-Vector-Unboxed.html#zipWithM_" class="link">Source</a></p><div class="doc"><p><em>O(min(m,n))</em> Zip the two vectors with the monadic action and ignore the
 results
</p></div></div><h2 id="g:25">Unzipping
</h2><div class="top"><p class="src"><a name="v:unzip" class="def">unzip</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (a, b) -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b)<a href="src/Data-Vector-Unboxed.html#unzip" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Unzip 2 vectors
</p></div></div><div class="top"><p class="src"><a name="v:unzip3" class="def">unzip3</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (a, b, c) -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c)<a href="src/Data-Vector-Unboxed.html#unzip3" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Unzip 3 vectors
</p></div></div><div class="top"><p class="src"><a name="v:unzip4" class="def">unzip4</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (a, b, c, d) -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d)<a href="src/Data-Vector-Unboxed.html#unzip4" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Unzip 4 vectors
</p></div></div><div class="top"><p class="src"><a name="v:unzip5" class="def">unzip5</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (a, b, c, d, e) -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> e)<a href="src/Data-Vector-Unboxed.html#unzip5" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Unzip 5 vectors
</p></div></div><div class="top"><p class="src"><a name="v:unzip6" class="def">unzip6</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> c, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> d, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> e, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> f) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> (a, b, c, d, e, f) -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> c, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> d, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> e, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> f)<a href="src/Data-Vector-Unboxed.html#unzip6" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Unzip 6 vectors
</p></div></div><h1 id="g:26">Working with predicates
</h1><h2 id="g:27">Filtering
</h2><div class="top"><p class="src"><a name="v:filter" class="def">filter</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#filter" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Drop elements that do not satisfy the predicate
</p></div></div><div class="top"><p class="src"><a name="v:ifilter" class="def">ifilter</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#ifilter" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Drop elements that do not satisfy the predicate which is applied to
 values and their indices
</p></div></div><div class="top"><p class="src"><a name="v:filterM" class="def">filterM</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a) =&gt; (a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a)<a href="src/Data-Vector-Unboxed.html#filterM" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Drop elements that do not satisfy the monadic predicate
</p></div></div><div class="top"><p class="src"><a name="v:takeWhile" class="def">takeWhile</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#takeWhile" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Yield the longest prefix of elements satisfying the predicate
 without copying.
</p></div></div><div class="top"><p class="src"><a name="v:dropWhile" class="def">dropWhile</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#dropWhile" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Drop the longest prefix of elements that satisfy the predicate
 without copying.
</p></div></div><h2 id="g:28">Partitioning
</h2><div class="top"><p class="src"><a name="v:partition" class="def">partition</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a)<a href="src/Data-Vector-Unboxed.html#partition" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Split the vector in two parts, the first one containing those
 elements that satisfy the predicate and the second one those that don't. The
 relative order of the elements is preserved at the cost of a sometimes
 reduced performance compared to <code><a href="Data-Vector-Unboxed.html#v:unstablePartition">unstablePartition</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:unstablePartition" class="def">unstablePartition</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a)<a href="src/Data-Vector-Unboxed.html#unstablePartition" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Split the vector in two parts, the first one containing those
 elements that satisfy the predicate and the second one those that don't.
 The order of the elements is not preserved but the operation is often
 faster than <code><a href="Data-Vector-Unboxed.html#v:partition">partition</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:span" class="def">span</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a)<a href="src/Data-Vector-Unboxed.html#span" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Split the vector into the longest prefix of elements that satisfy
 the predicate and the rest without copying.
</p></div></div><div class="top"><p class="src"><a name="v:break" class="def">break</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a, <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a)<a href="src/Data-Vector-Unboxed.html#break" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Split the vector into the longest prefix of elements that do not
 satisfy the predicate and the rest without copying.
</p></div></div><h2 id="g:29">Searching
</h2><div class="top"><p class="src"><a name="v:elem" class="def">elem</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> a) =&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-Vector-Unboxed.html#elem" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Check if the vector contains an element
</p></div></div><div class="top"><p class="src"><a name="v:notElem" class="def">notElem</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> a) =&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-Vector-Unboxed.html#notElem" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Check if the vector does not contain an element (inverse of <code><a href="Data-Vector-Unboxed.html#v:elem">elem</a></code>)
</p></div></div><div class="top"><p class="src"><a name="v:find" class="def">find</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a<a href="src/Data-Vector-Unboxed.html#find" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Yield <code><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#v:Just">Just</a></code> the first element matching the predicate or <code><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code>
 if no such element exists.
</p></div></div><div class="top"><p class="src"><a name="v:findIndex" class="def">findIndex</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a><a href="src/Data-Vector-Unboxed.html#findIndex" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Yield <code><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#v:Just">Just</a></code> the index of the first element matching the predicate
 or <code><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code> if no such element exists.
</p></div></div><div class="top"><p class="src"><a name="v:findIndices" class="def">findIndices</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a><a href="src/Data-Vector-Unboxed.html#findIndices" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Yield the indices of elements satisfying the predicate in ascending
 order.
</p></div></div><div class="top"><p class="src"><a name="v:elemIndex" class="def">elemIndex</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> a) =&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a><a href="src/Data-Vector-Unboxed.html#elemIndex" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Yield <code><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#v:Just">Just</a></code> the index of the first occurence of the given element or
 <code><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code> if the vector does not contain the element. This is a specialised
 version of <code><a href="Data-Vector-Unboxed.html#v:findIndex">findIndex</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:elemIndices" class="def">elemIndices</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> a) =&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a><a href="src/Data-Vector-Unboxed.html#elemIndices" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Yield the indices of all occurences of the given element in
 ascending order. This is a specialised version of <code><a href="Data-Vector-Unboxed.html#v:findIndices">findIndices</a></code>.
</p></div></div><h1 id="g:30">Folding
</h1><div class="top"><p class="src"><a name="v:foldl" class="def">foldl</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b =&gt; (a -&gt; b -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; a<a href="src/Data-Vector-Unboxed.html#foldl" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Left fold
</p></div></div><div class="top"><p class="src"><a name="v:foldl1" class="def">foldl1</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a<a href="src/Data-Vector-Unboxed.html#foldl1" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Left fold on non-empty vectors
</p></div></div><div class="top"><p class="src"><a name="v:foldl-39-" class="def">foldl'</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b =&gt; (a -&gt; b -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; a<a href="src/Data-Vector-Unboxed.html#foldl%27" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Left fold with strict accumulator
</p></div></div><div class="top"><p class="src"><a name="v:foldl1-39-" class="def">foldl1'</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a<a href="src/Data-Vector-Unboxed.html#foldl1%27" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Left fold on non-empty vectors with strict accumulator
</p></div></div><div class="top"><p class="src"><a name="v:foldr" class="def">foldr</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; b<a href="src/Data-Vector-Unboxed.html#foldr" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Right fold
</p></div></div><div class="top"><p class="src"><a name="v:foldr1" class="def">foldr1</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a<a href="src/Data-Vector-Unboxed.html#foldr1" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Right fold on non-empty vectors
</p></div></div><div class="top"><p class="src"><a name="v:foldr-39-" class="def">foldr'</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; b<a href="src/Data-Vector-Unboxed.html#foldr%27" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Right fold with a strict accumulator
</p></div></div><div class="top"><p class="src"><a name="v:foldr1-39-" class="def">foldr1'</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a<a href="src/Data-Vector-Unboxed.html#foldr1%27" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Right fold on non-empty vectors with strict accumulator
</p></div></div><div class="top"><p class="src"><a name="v:ifoldl" class="def">ifoldl</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; b -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; a<a href="src/Data-Vector-Unboxed.html#ifoldl" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Left fold (function applied to each element and its index)
</p></div></div><div class="top"><p class="src"><a name="v:ifoldl-39-" class="def">ifoldl'</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; b -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; a<a href="src/Data-Vector-Unboxed.html#ifoldl%27" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Left fold with strict accumulator (function applied to each element
 and its index)
</p></div></div><div class="top"><p class="src"><a name="v:ifoldr" class="def">ifoldr</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; b<a href="src/Data-Vector-Unboxed.html#ifoldr" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Right fold (function applied to each element and its index)
</p></div></div><div class="top"><p class="src"><a name="v:ifoldr-39-" class="def">ifoldr'</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; b<a href="src/Data-Vector-Unboxed.html#ifoldr%27" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Right fold with strict accumulator (function applied to each
 element and its index)
</p></div></div><h2 id="g:31">Specialised folds
</h2><div class="top"><p class="src"><a name="v:all" class="def">all</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-Vector-Unboxed.html#all" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Check if all elements satisfy the predicate.
</p></div></div><div class="top"><p class="src"><a name="v:any" class="def">any</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-Vector-Unboxed.html#any" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Check if any element satisfies the predicate.
</p></div></div><div class="top"><p class="src"><a name="v:and" class="def">and</a> :: <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-Vector-Unboxed.html#and" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Check if all elements are <code><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#v:True">True</a></code>
</p></div></div><div class="top"><p class="src"><a name="v:or" class="def">or</a> :: <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-Vector-Unboxed.html#or" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Check if any element is <code><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#v:True">True</a></code>
</p></div></div><div class="top"><p class="src"><a name="v:sum" class="def">sum</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a<a href="src/Data-Vector-Unboxed.html#sum" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Compute the sum of the elements
</p></div></div><div class="top"><p class="src"><a name="v:product" class="def">product</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a<a href="src/Data-Vector-Unboxed.html#product" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Compute the produce of the elements
</p></div></div><div class="top"><p class="src"><a name="v:maximum" class="def">maximum</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> a) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a<a href="src/Data-Vector-Unboxed.html#maximum" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Yield the maximum element of the vector. The vector may not be
 empty.
</p></div></div><div class="top"><p class="src"><a name="v:maximumBy" class="def">maximumBy</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ordering">Ordering</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a<a href="src/Data-Vector-Unboxed.html#maximumBy" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Yield the maximum element of the vector according to the given
 comparison function. The vector may not be empty.
</p></div></div><div class="top"><p class="src"><a name="v:minimum" class="def">minimum</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> a) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a<a href="src/Data-Vector-Unboxed.html#minimum" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Yield the minimum element of the vector. The vector may not be
 empty.
</p></div></div><div class="top"><p class="src"><a name="v:minimumBy" class="def">minimumBy</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ordering">Ordering</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; a<a href="src/Data-Vector-Unboxed.html#minimumBy" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Yield the minimum element of the vector according to the given
 comparison function. The vector may not be empty.
</p></div></div><div class="top"><p class="src"><a name="v:minIndex" class="def">minIndex</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> a) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a><a href="src/Data-Vector-Unboxed.html#minIndex" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Yield the index of the minimum element of the vector. The vector
 may not be empty.
</p></div></div><div class="top"><p class="src"><a name="v:minIndexBy" class="def">minIndexBy</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ordering">Ordering</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a><a href="src/Data-Vector-Unboxed.html#minIndexBy" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Yield the index of the minimum element of the vector according to
 the given comparison function. The vector may not be empty.
</p></div></div><div class="top"><p class="src"><a name="v:maxIndex" class="def">maxIndex</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> a) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a><a href="src/Data-Vector-Unboxed.html#maxIndex" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Yield the index of the maximum element of the vector. The vector
 may not be empty.
</p></div></div><div class="top"><p class="src"><a name="v:maxIndexBy" class="def">maxIndexBy</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ordering">Ordering</a>) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a><a href="src/Data-Vector-Unboxed.html#maxIndexBy" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Yield the index of the maximum element of the vector according to
 the given comparison function. The vector may not be empty.
</p></div></div><h2 id="g:32">Monadic folds
</h2><div class="top"><p class="src"><a name="v:foldM" class="def">foldM</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; m a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; m a<a href="src/Data-Vector-Unboxed.html#foldM" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Monadic fold
</p></div></div><div class="top"><p class="src"><a name="v:foldM-39-" class="def">foldM'</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; m a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; m a<a href="src/Data-Vector-Unboxed.html#foldM%27" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Monadic fold with strict accumulator
</p></div></div><div class="top"><p class="src"><a name="v:fold1M" class="def">fold1M</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a) =&gt; (a -&gt; a -&gt; m a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m a<a href="src/Data-Vector-Unboxed.html#fold1M" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Monadic fold over non-empty vectors
</p></div></div><div class="top"><p class="src"><a name="v:fold1M-39-" class="def">fold1M'</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a) =&gt; (a -&gt; a -&gt; m a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m a<a href="src/Data-Vector-Unboxed.html#fold1M%27" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Monadic fold over non-empty vectors with strict accumulator
</p></div></div><div class="top"><p class="src"><a name="v:foldM_" class="def">foldM_</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; m a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Data-Vector-Unboxed.html#foldM_" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Monadic fold that discards the result
</p></div></div><div class="top"><p class="src"><a name="v:foldM-39-_" class="def">foldM'_</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; m a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Data-Vector-Unboxed.html#foldM%27_" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Monadic fold with strict accumulator that discards the result
</p></div></div><div class="top"><p class="src"><a name="v:fold1M_" class="def">fold1M_</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a) =&gt; (a -&gt; a -&gt; m a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Data-Vector-Unboxed.html#fold1M_" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Monadic fold over non-empty vectors that discards the result
</p></div></div><div class="top"><p class="src"><a name="v:fold1M-39-_" class="def">fold1M'_</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a) =&gt; (a -&gt; a -&gt; m a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Data-Vector-Unboxed.html#fold1M%27_" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Monadic fold over non-empty vectors with strict accumulator
 that discards the result
</p></div></div><h1 id="g:33">Prefix sums (scans)
</h1><div class="top"><p class="src"><a name="v:prescanl" class="def">prescanl</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#prescanl" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Prescan
</p><pre>
 prescanl f z = <code><a href="Data-Vector-Unboxed.html#v:init">init</a></code> . <code><a href="Data-Vector-Unboxed.html#v:scanl">scanl</a></code> f z
</pre><p>Example: <code>prescanl (+) 0 &lt;1,2,3,4&gt; = &lt;0,1,3,6&gt;</code>
</p></div></div><div class="top"><p class="src"><a name="v:prescanl-39-" class="def">prescanl'</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#prescanl%27" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Prescan with strict accumulator
</p></div></div><div class="top"><p class="src"><a name="v:postscanl" class="def">postscanl</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#postscanl" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Scan
</p><pre>
 postscanl f z = <code><a href="Data-Vector-Unboxed.html#v:tail">tail</a></code> . <code><a href="Data-Vector-Unboxed.html#v:scanl">scanl</a></code> f z
</pre><p>Example: <code>postscanl (+) 0 &lt;1,2,3,4&gt; = &lt;1,3,6,10&gt;</code>
</p></div></div><div class="top"><p class="src"><a name="v:postscanl-39-" class="def">postscanl'</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#postscanl%27" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Scan with strict accumulator
</p></div></div><div class="top"><p class="src"><a name="v:scanl" class="def">scanl</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#scanl" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Haskell-style scan
</p><pre> scanl f z &lt;x1,...,xn&gt; = &lt;y1,...,y(n+1)&gt;
   where y1 = z
         yi = f y(i-1) x(i-1)
</pre><p>Example: <code>scanl (+) 0 &lt;1,2,3,4&gt; = &lt;0,1,3,6,10&gt;</code>
</p></div></div><div class="top"><p class="src"><a name="v:scanl-39-" class="def">scanl'</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; a) -&gt; a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#scanl%27" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Haskell-style scan with strict accumulator
</p></div></div><div class="top"><p class="src"><a name="v:scanl1" class="def">scanl1</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#scanl1" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Scan over a non-empty vector
</p><pre> scanl f &lt;x1,...,xn&gt; = &lt;y1,...,yn&gt;
   where y1 = x1
         yi = f y(i-1) xi
</pre></div></div><div class="top"><p class="src"><a name="v:scanl1-39-" class="def">scanl1'</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#scanl1%27" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Scan over a non-empty vector with a strict accumulator
</p></div></div><div class="top"><p class="src"><a name="v:prescanr" class="def">prescanr</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b<a href="src/Data-Vector-Unboxed.html#prescanr" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Right-to-left prescan
</p><pre>
 prescanr f z = <code><a href="Data-Vector-Unboxed.html#v:reverse">reverse</a></code> . <code><a href="Data-Vector-Unboxed.html#v:prescanl">prescanl</a></code> (flip f) z . <code><a href="Data-Vector-Unboxed.html#v:reverse">reverse</a></code>
</pre></div></div><div class="top"><p class="src"><a name="v:prescanr-39-" class="def">prescanr'</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b<a href="src/Data-Vector-Unboxed.html#prescanr%27" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Right-to-left prescan with strict accumulator
</p></div></div><div class="top"><p class="src"><a name="v:postscanr" class="def">postscanr</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b<a href="src/Data-Vector-Unboxed.html#postscanr" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Right-to-left scan
</p></div></div><div class="top"><p class="src"><a name="v:postscanr-39-" class="def">postscanr'</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b<a href="src/Data-Vector-Unboxed.html#postscanr%27" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Right-to-left scan with strict accumulator
</p></div></div><div class="top"><p class="src"><a name="v:scanr" class="def">scanr</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b<a href="src/Data-Vector-Unboxed.html#scanr" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Right-to-left Haskell-style scan
</p></div></div><div class="top"><p class="src"><a name="v:scanr-39-" class="def">scanr'</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> b) =&gt; (a -&gt; b -&gt; b) -&gt; b -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> b<a href="src/Data-Vector-Unboxed.html#scanr%27" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Right-to-left Haskell-style scan with strict accumulator
</p></div></div><div class="top"><p class="src"><a name="v:scanr1" class="def">scanr1</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#scanr1" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Right-to-left scan over a non-empty vector
</p></div></div><div class="top"><p class="src"><a name="v:scanr1-39-" class="def">scanr1'</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (a -&gt; a -&gt; a) -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#scanr1%27" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Right-to-left scan over a non-empty vector with a strict
 accumulator
</p></div></div><h1 id="g:34">Conversions
</h1><h2 id="g:35">Lists
</h2><div class="top"><p class="src"><a name="v:toList" class="def">toList</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; [a]<a href="src/Data-Vector-Unboxed.html#toList" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Convert a vector to a list
</p></div></div><div class="top"><p class="src"><a name="v:fromList" class="def">fromList</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; [a] -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#fromList" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Convert a list to a vector
</p></div></div><div class="top"><p class="src"><a name="v:fromListN" class="def">fromListN</a> :: <a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; [a] -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a<a href="src/Data-Vector-Unboxed.html#fromListN" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Convert the first <code>n</code> elements of a list to a vector
</p><pre>
 fromListN n xs = <code><a href="Data-Vector-Unboxed.html#v:fromList">fromList</a></code> (<code><a href="Data-Vector-Unboxed.html#v:take">take</a></code> n xs)
</pre></div></div><h2 id="g:36">Other vector types
</h2><div class="top"><p class="src"><a name="v:convert" class="def">convert</a> :: (<a href="Data-Vector-Generic.html#t:Vector">Vector</a> v a, <a href="Data-Vector-Generic.html#t:Vector">Vector</a> w a) =&gt; v a -&gt; w a<a href="src/Data-Vector-Generic.html#convert" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Convert different vector types
</p></div></div><h2 id="g:37">Mutable vectors
</h2><div class="top"><p class="src"><a name="v:freeze" class="def">freeze</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; m (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a)<a href="src/Data-Vector-Unboxed.html#freeze" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Yield an immutable copy of the mutable vector.
</p></div></div><div class="top"><p class="src"><a name="v:thaw" class="def">thaw</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m (<a href="Data-Vector-Unboxed.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a)<a href="src/Data-Vector-Unboxed.html#thaw" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Yield a mutable copy of the immutable vector.
</p></div></div><div class="top"><p class="src"><a name="v:copy" class="def">copy</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Data-Vector-Unboxed.html#copy" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Copy an immutable vector into a mutable one. The two vectors must
 have the same length.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeFreeze" class="def">unsafeFreeze</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; m (<a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a)<a href="src/Data-Vector-Unboxed.html#unsafeFreeze" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Unsafe convert a mutable vector to an immutable one without
 copying. The mutable vector may not be used after this operation.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeThaw" class="def">unsafeThaw</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m (<a href="Data-Vector-Unboxed.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a)<a href="src/Data-Vector-Unboxed.html#unsafeThaw" class="link">Source</a></p><div class="doc"><p><em>O(1)</em> Unsafely convert an immutable vector to a mutable one without
 copying. The immutable vector may not be used after this operation.
</p></div></div><div class="top"><p class="src"><a name="v:unsafeCopy" class="def">unsafeCopy</a> :: (<a href="Data-Vector-Unboxed.html#t:Unbox">Unbox</a> a, <a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m) =&gt; <a href="Data-Vector-Unboxed.html#t:MVector">MVector</a> (<a href="/usr/share/doc/ghc/html/libraries/primitive-0.4.1/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m) a -&gt; <a href="Data-Vector-Unboxed.html#t:Vector">Vector</a> a -&gt; m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Data-Vector-Unboxed.html#unsafeCopy" class="link">Source</a></p><div class="doc"><p><em>O(n)</em> Copy an immutable vector into a mutable one. The two vectors must
 have the same length. This is not checked.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.10.0</p></div></body></html>