projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
bbbba97
)
[project @ 2005-01-13 10:46:36 by ross]
author
ross
<unknown>
Thu, 13 Jan 2005 10:46:36 +0000
(10:46 +0000)
committer
ross
<unknown>
Thu, 13 Jan 2005 10:46:36 +0000
(10:46 +0000)
make comments ASCII
Data/Tree.hs
patch
|
blob
|
history
diff --git
a/Data/Tree.hs
b/Data/Tree.hs
index
5d91af8
..
5c95f2a
100644
(file)
--- 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
-- | 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) $
-- 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
-- | 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
-- 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