X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Data%2FTree.hs;h=5c95f2ab965ca36e187d4a59a66ed9eac026a21b;hb=6da27616340f00cb0fa767c953cc8cca0b86f879;hp=5d91af8470d881e7d9f941f1e10cab29a8e6496a;hpb=bbbba97cbcf12039810533e3a2daf2eefdefe7f0;p=ghc-base.git diff --git a/Data/Tree.hs b/Data/Tree.hs index 5d91af8..5c95f2a 100644 --- a/Data/Tree.hs +++ b/Data/Tree.hs @@ -104,7 +104,7 @@ unfoldForestM f = mapM (unfoldTreeM f) -- | Monadic tree builder, in breadth-first order, -- using an algorithm adapted from --- /Breadth­First Numbering: Lessons from a Small Exercise in Algorithm Design/, +-- /Breadth-First Numbering: Lessons from a Small Exercise in Algorithm Design/, -- by Chris Okasaki, /ICFP'00/. unfoldTreeM_BF :: Monad m => (b -> m (a, [b])) -> b -> m (Tree a) unfoldTreeM_BF f b = liftM (fst . fromJust . deQueue) $ @@ -112,7 +112,7 @@ unfoldTreeM_BF f b = liftM (fst . fromJust . deQueue) $ -- | Monadic forest builder, in breadth-first order, -- using an algorithm adapted from --- /Breadth­First Numbering: Lessons from a Small Exercise in Algorithm Design/, +-- /Breadth-First Numbering: Lessons from a Small Exercise in Algorithm Design/, -- by Chris Okasaki, /ICFP'00/. unfoldForestM_BF :: Monad m => (b -> m (a, [b])) -> [b] -> m (Forest a) unfoldForestM_BF f = liftM (reverseOnto []) . unfoldForestQ f . listToQueue