<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">I was looking at some code and couldn't figure out how it was returning a list since there were no list constructors present.<br><br>Thanks!<br><br>Michael<br><br>--- On <b>Tue, 5/12/09, Brent Yorgey <i><byorgey@seas.upenn.edu></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Brent Yorgey <byorgey@seas.upenn.edu><br>Subject: Re: [Haskell-cafe] Inferred typing?<br>To: haskell-cafe@haskell.org<br>Date: Tuesday, May 12, 2009, 7:50 AM<br><br><div class="plainMail">On Mon, May 11, 2009 at 10:59:01PM -0700, michael rice wrote:<br>> In the code below, is the type returned by the return functions inferred from <br>> the result type in the function type signature, i.e., just change the result<br>> type to Maybe Int and the code will return a Maybe monad, (Just 4), instead
of<br>> a List monad?<br><br>Indeed, it is. Try it! =)<br><br>-Brent<br>_______________________________________________<br>Haskell-Cafe mailing list<br><a ymailto="mailto:Haskell-Cafe@haskell.org" href="/mc/compose?to=Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br></div></blockquote></td></tr></table><br>