permutation-0.3: A library for permutations and combinations.

Stabilityexperimental
MaintainerPatrick Perry <patperry@stanford.edu>

Data.Choose.ST

Contents

Description

Mutable combinations in the ST monad.

Synopsis

Combinations

data STChoose s Source

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

Instances

Eq (STChoose s) 
MChoose (STChoose s) (ST s) 

runSTChoose :: (forall s. ST s (STChoose s)) -> ChooseSource

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

Overloaded mutable combination interface