30 Apr
2004
30 Apr
'04
12:48 a.m.
On 2004-04-29T18:27:32-0500, Ben_Yu@asc.aon.com wrote:
While writing monad programs, I sometimes want to do a return as it is in imperative program. i.e., do{return 1; return 2} is same as return 1
Hello, You can build an error monad transformer along the lines of the Control.Monad.Error module, in particular the ErrorT data type there (but without the Error class). You can then replace "return" above with "throwError" for your error monad transformer. Ken -- Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig BBC News: Universities face week of protest http://news.bbc.co.uk/1/hi/education/3508209.stm