[Haskell-cafe] Scrap your boilerplate traversals

2009-11-25 Thread rodrigo.bonifacio
Hi all, Is there a non-recursive traversal defined in Data.Generics' modules? I mean, the everywhere traversal first applies a function "f" to the subterms, and then applies "f" to the result. I am wondering if do exists a traversal that applies f only to the subterms. Thanks in advance, Rodrigo.  

Re: [Haskell-cafe] Scrap your boilerplate traversals

2009-11-25 Thread Neil Brown
Hi, You want gmapT (or gmapM for the monadic version). If you look at the source to the everywhere function, you'll see that everywhere is defined in terms of gmapT: everywhere f = f . gmapT (everywhere f) Thanks, Neil. rodrigo.bonifacio wrote: Hi all, Is there a non-recursive