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 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.

------------------------------------------------------------------------

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to