Problem with Infinite Lists
Wed, 3 Sep 2003 12:51:21 +0200
On Wednesday 03 September 2003 10:30, Wamberto Vasconcelos wrote:
> Which seems to work:
> Main> take 20 all_fib
> However, when I tried
> Main> filter even (take 20 all_fib)
> ERROR - Illegal Haskell 98 class constraint in inferred type
> *** Expression : filter even (take 20 all_fib)
> *** Type : Integral Float =3D> [Float]
> What is going on here?
"even" wants an integral type for its argument, but you are applying it t=
list of floats.