permutation-0.5.0.1: A library for permutations and combinations.

Stabilityexperimental
MaintainerPatrick Perry <patperry@stanford.edu>
Safe HaskellNone

Data.Permute.ST

Contents

Description

Mutable permutations in the ST monad.

Synopsis

Permutations

data STPermute s Source

A mutable permutation that can be manipulated in the ST monad. The type argument s is the state variable argument for the ST type.

Instances

runSTPermute :: (forall s. ST s (STPermute s)) -> PermuteSource

A safe way to create and work with a mutable permutation before returning an immutable one for later perusal. This function avoids copying the permutation before returning it - it uses unsafeFreeze internally, but this wrapper is a safe interface to that function.

Overloaded mutable permutation interface