Skip to content

Conversation

gbagan
Copy link
Contributor

@gbagan gbagan commented Oct 31, 2023

Description of the change

This PR adds clone :: forall h a. STArray h a -> ST h (STArray h a) to the Data.Array.ST module.
It makes a mutable copy of a mutable array.
This is similar to the clone function in the Haskell module Data.Vector.Mutable.
This is equivalent to unsafeThaw <<< freeze but more readable.
I need it in one of my projects.


Checklist:

  • Added the change to the changelog's "Unreleased" section with a reference to this PR (e.g. "- Made a change (#0000)")
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation
  • Added a test for the contribution (if applicable)

@garyb
Copy link
Member

garyb commented Nov 2, 2023

Could you add a note to the changelog too?

@garyb
Copy link
Member

garyb commented Nov 2, 2023

Thanks!

@garyb garyb merged commit d521e17 into purescript:master Nov 2, 2023
@garyb
Copy link
Member

garyb commented Nov 3, 2023

Now released as v7.3.0, apologies for the delay 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants