Module

Data.Stream

Package
purescript-monadic-streams
Repository
blinky3713/purescript-monadic-streams

#StreamT Source

newtype StreamT m a

StreamT m a represents a stream of values of type a in a context provided by m

Instances

#Stream Source

type Stream a = StreamT Identity a

StreamT specialized to the identity context

#stream Source

stream :: forall a m. Monad m => Array a -> StreamT m a

Convert an array into a stream

#unstream Source

unstream :: forall a m. Monad m => StreamT m a -> m (Array a)

Convert a stream into an array

#enumStream Source

enumStream :: forall a m. Monad m => Enum a => Tuple a a -> StreamT m a

A stream which produces enum values in a range, including the endpoints

#mapM Source

mapM :: forall b a m. Monad m => (a -> m b) -> StreamT m a -> StreamT m b

#foldl Source

foldl :: forall b a m. Monad m => (b -> a -> b) -> b -> StreamT m a -> m b

#foldr Source

foldr :: forall b a m. Monad m => (a -> b -> b) -> b -> StreamT m a -> m b

#foldMap Source

foldMap :: forall b a m. Monad m => Monoid b => (a -> b) -> StreamT m a -> m b

#hoist Source

hoist :: forall a n m. (m ~> n) -> StreamT m a -> StreamT n a

Use a natural transformation to change the context

Modules
Data.Stream