+1 on Control.Monad.Omega.  In point of fact, your diagN function is simply

diagN = runOmega . mapM Omega

You'll find it an interesting exercise to grok the source of
Control.Monad.Omega, obviously, but essentially, you're replacing concatMap
with a fair (diagonal) traversal order version.

Louis Wasserman
wasserman.lo...@gmail.com
http://profiles.google.com/wasserman.louis
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to