[Haskell-beginners] Question about List Type Constraint and Null
Jürgen Doser
jurgen.doser at gmail.com
Sat Jan 22 19:50:55 CET 2011
El sáb, 22-01-2011 a las 00:03 -0600, aditya siram escribió:
>
> But I have a further question why should 'null ...' care about the
> type of its list argument? Isn't it polymorphic? So it shouldn't make
> a difference that the 'a' inside res is ambiguous because we know for
> sure that it always returns a list of some kind.
The point is that for different types for res, the list has a different
number of elements. So without saying what the type of res is, you
cannot know if the list is empty or not.
Jürgen
More information about the Beginners
mailing list