I was looking at some code and couldn't figure out how it was returning a list
since there were no list constructors present.
Thanks!
Michael
--- On Tue, 5/12/09, Brent Yorgey wrote:
From: Brent Yorgey
Subject: Re: [Haskell-cafe] Inferred typing?
To: haskell-cafe@haskell.org
Date: Tu
Am Dienstag 12 Mai 2009 07:59:01 schrieb michael rice:
> In the code below, is the type returned by the return functions inferred
> from the result type in the function type signature, i.e., just change the
> result type to Maybe Int and the code will return a Maybe monad, (Just 4),
> instead of a
On Mon, May 11, 2009 at 10:59:01PM -0700, michael rice wrote:
> In the code below, is the type returned by the return functions inferred from
> the result type in the function type signature, i.e., just change the result
> type to Maybe Int and the code will return a Maybe monad, (Just 4), instead
In the code below, is the type returned by the return functions inferred from
the result type in the function type signature, i.e., just change the result
type to Maybe Int and the code will return a Maybe monad, (Just 4), instead of
a List monad?
Michael
=
import Monad
fn :: [Int] ->