@@ -302,6 +302,7 @@ foldlMap1 f g = -- Use a lambda to allow inlining with two arguments
302
302
instance NFData a => NFData (Tree a ) where
303
303
rnf (Node x ts) = rnf x `seq` rnf ts
304
304
305
+ -- | @since 0.5.10.1
305
306
instance MonadZip Tree where
306
307
mzipWith f (Node a as) (Node b bs)
307
308
= Node (f a b) (mzipWith (mzipWith f) as bs)
@@ -489,8 +490,9 @@ unfoldForestM f = Prelude.mapM (unfoldTreeM f)
489
490
--
490
491
-- See 'unfoldTree' for more info.
491
492
--
492
- -- Implemented using an algorithm adapted from /Breadth-First Numbering: Lessons
493
- -- from a Small Exercise in Algorithm Design/, by Chris Okasaki, /ICFP'00/.
493
+ -- Implemented using an algorithm adapted from
494
+ -- /Breadth-First Numbering: Lessons from a Small Exercise in Algorithm Design/,
495
+ -- by Chris Okasaki, /ICFP'00/.
494
496
unfoldTreeM_BF :: Monad m => (b -> m (a , [b ])) -> b -> m (Tree a )
495
497
unfoldTreeM_BF f b = liftM getElement $ unfoldForestQ f (singleton b)
496
498
where
@@ -502,8 +504,9 @@ unfoldTreeM_BF f b = liftM getElement $ unfoldForestQ f (singleton b)
502
504
--
503
505
-- See 'unfoldForest' for more info.
504
506
--
505
- -- Implemented using an algorithm adapted from /Breadth-First Numbering: Lessons
506
- -- from a Small Exercise in Algorithm Design/, by Chris Okasaki, /ICFP'00/.
507
+ -- Implemented using an algorithm adapted from
508
+ -- /Breadth-First Numbering: Lessons from a Small Exercise in Algorithm Design/,
509
+ -- by Chris Okasaki, /ICFP'00/.
507
510
unfoldForestM_BF :: Monad m => (b -> m (a , [b ])) -> [b ] -> m ([Tree a ])
508
511
unfoldForestM_BF f = liftM toList . unfoldForestQ f . fromList
509
512
0 commit comments