5 Sep 2000 07:17:00 GMT, Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> pisze:
> There is a chance that it was not garbage collected yet but it's dead,
> and reading a whole 10 megs of file when the user losed its interest
> after first bytes is unnecessary. So this is not a sufficient rule.
But
Hi!
I'm intrigued by the following Haskell behaviour:
The type of (+) is
(+) :: (Num a) => a -> a -> a
Now, if I define
p = (+)
the type of p is inferred to be
p :: Integer -> Integer -> Integer
How come?
I guess the answer can be found somewhere in the Haskell report, but I'd
really appr
On 08-Sep-2000, Jan Carlson <[EMAIL PROTECTED]> wrote:
> I'm intrigued by the following Haskell behaviour:
>
> The type of (+) is
>
> (+) :: (Num a) => a -> a -> a
>
> Now, if I define
>
> p = (+)
>
> the type of p is inferred to be
>
> p :: Integer -> Integer -> Integer
>
> How come?
>
>
> If you define `p' as a syntactic function, e.g.
>
> p x y = x + y
> or
>
> p x = (+) x
>
> rather than via
>
> p = (+)
>
> then the monomorphism restriction does not apply, and so the type inferred
> for `p' will be the correct polymorphic type `Num a => a -> a -> a'.
Ma
Sat, 9 Sep 2000 00:56:46 +1100, Fergus Henderson <[EMAIL PROTECTED]> pisze:
> If you define `p' as a syntactic function, e.g.
> then the monomorphism restriction does not apply, and so the type inferred
> for `p' will be the correct polymorphic type `Num a => a -> a -> a'.
Also when an explicit
I have worked through "Haskell: The craft of functional programming".
Learning the language is one thing, applying FP is another. The next thing
I would like to study would be a catalog of patterns for lazy functional
programming. In the Object-oriented world, there are some catalogs of
useful p