Skip to content

fromList for mutable arrays #413

@meooow25

Description

@meooow25

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions