+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
[email protected]
http://profiles.google.com/wasserman.louis
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to