Skip to content

fromList for mutable arrays #413

Open
@meooow25

Description

It would useful to have a function like

mutableArrayFromListN :: PrimMonad m => Int -> [a] -> m (MutableArray (PrimState m) a)

given that there already exists

arrayFromListN :: Int -> [a] -> Array a 

My particular use case is also more directly expressed by generate, but I understand if this is too much for this library.

generate :: PrimMonad m => Int -> (Int -> a) -> m (MutableArray (PrimState m) a)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions