Skip to content

How do I generate an IO Vector? #175

Description

@tomjaguarpaw

Data.Vector has generate :: Int -> (Int -> a) -> Vector a but I don't see an equivalent in Data.Vector.Mutable. What am I missing?

Activity

  1. cartazio commented on Jun 17, 2017

    @cartazio
    Contributor
  2. tomjaguarpaw commented on Jun 17, 2017

    @tomjaguarpaw
    MemberAuthor

    So if someone submitted a PR to add generate it would likely be accepted?

  3. dolio commented on Jun 17, 2017

    @dolio
    Contributor

    I think the API for mutable vectors is lacking a lot of utilities, so yeah, I'd accept it.

    It may be that there's a rewrite rule in place to turn any Vector construction into a corresponding MVector construction (because if you think about it, building an immutable vector has to be building a mutable vector and then freezing). However, off hand I don't know what it is, and it isn't the most obvious thing to try. I could take a look if you'd be interested in that, though.

  4. Shimuuar commented on Oct 21, 2020

    @Shimuuar
    Contributor

    Closed in favor of #334

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

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