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

Stabilityprovisional
MaintainerVivian McPhail <haskell.vivian.mcphail@gmail.com>

Data.Vector.Buffer

Description

A buffer that can be used as a vector

Synopsis

Documentation

data Buffer a Source

newBufferSource

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