Control-Monad-MultiPass-0.1.0.0: A Library for Writing Multi-Pass Algorithms.
Control.Monad.MultiPass.Example.Repmin
Description
An implementation of the classic repmin algorithm, using the Control.Monad.MultiPass library.
repmin
Synopsis
data Tree a Source
Binary tree datatype.
Constructors
Instances
repmin :: Ord a => Tree a -> Tree aSource
Original algorithm, which uses lazy evaluation.
repminMP :: Ord a => Tree a -> ST2 r w (Tree a)Source
New algorithm, using the Control.Monad.MultiPass library.
repminMP2 :: Ord a => Tree a -> ST2 r w (Tree a)Source
Second version of the new algorithm (repminMP), using the Knot3 instrument, rather than TopKnot.
repminMP
Knot3
TopKnot
repminMP3 :: Ord a => Tree a -> ST2 r w (Tree a)Source
Third version of the new algorithm (repminMP), using the Monoid2 instrument.
Monoid2