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.Buffer

Description

A buffer that can be used as a vector

Synopsis

Documentation

data Buffer a Source

newBuffer Source

Arguments

:: Int

Size

-> IO (Buffer a) 

create a new buffer

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

add the next element to the buffer

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

convert to a vector

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

monadic map over a buffer

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

monadic map over a buffer