vector-buffer-0.4.1: A buffer compatible with Data.Vector.*

Copyright(c) A.V.H. McPhail 2011
LicenseBSD3
MaintainerVivian McPhail <haskell.vivian.mcphail@gmail.com>
Stabilityprovisional
Safe HaskellNone
LanguageHaskell98

Data.Vector.Unboxed.Buffer

Description

A buffer that can be used as a vector

Synopsis

Documentation

data Buffer a Source

newBuffer Source

Arguments

:: Unbox a 
=> Int

Size

-> IO (Buffer a) 

create a new buffer

pushNextElement :: Unbox a => Buffer a -> a -> IO () Source

add the next element to the buffer

toVector :: Unbox a => Buffer a -> IO (Vector a) Source

convert to a vector

mapBufferM :: (Unbox a, Unbox b) => (a -> IO b) -> Buffer a -> IO (Vector b) Source

monadic map over a buffer

mapBufferM_ :: Unbox a => (a -> IO b) -> Buffer a -> IO () Source

monadic map over a buffer