[Haskell-beginners] Type assignment for List

Rein Henrichs rein.henrichs at gmail.com
Sun Aug 9 06:24:11 UTC 2015


What?

On Sat, Aug 8, 2015 at 10:11 PM yi lu <zhiwudazhanjiangshi at gmail.com> wrote:

> 1
>
> *Prelude> :t (:)*
> *(:) :: a -> [a] -> [a]*
>
> *xs will at least be a list of list.*
>
> On Sun, Aug 9, 2015 at 12:21 PM, RAJATKUMAR ZALA <rajatkumarzala at yahoo.com
> > wrote:
>
>> Hello Friends,
>>
>> I am totally new to Haskell. I am learning Haskell from a website on my
>> own pace. From that site, I came to know about list in haskell and its type
>> assignment. There is a confusable question on site. I am posting question
>> here....
>>
>>
>>
>> 1. Given that the expression []:xs is well typed, which of the following
>> is not a possible type assignment for xs?
>>
>>
>> Options:-
>>
>> 1. xs :: [Int]
>> 2. xs :: [[Float]]
>> 3. xs :: [[[Char]]]
>> 4. xs :: [[[[Bool]]]]
>>
>>
>> If any friend know about it then please clarify me on it.
>>
>> Thanks in advance
>>
>> Rajatkumar Zala
>> India
>> _______________________________________________
>> Beginners mailing list
>> Beginners at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150809/4be037ef/attachment.html>


More information about the Beginners mailing list