<div dir="ltr">Hi all,<div><br></div><div>I understand that the take method will evaluate the value inside the cons cell whereas length will just evaluate the spine or structure of the list </div><div><br></div><div><div>λ> let y = "abc"</div><div>Prelude|</div><div>y :: [Char]</div><div>λ> :sprint y</div><div>y = _</div><div>λ> take 1 y</div><div>"a"</div><div>it :: [Char]</div><div>λ> :sprint y</div><div>y = 'a' : _</div><div>λ></div></div><div><br clear="all"><div>Well and good but why doesn't the same work on a list of Nums??</div><div><br></div><div><div>λ> let x = [1,2,3]</div><div>Prelude|</div><div>x :: Num t => [t]</div><div>λ> :sprint x</div><div>x = _</div><div>λ> take 1 x</div><div>[1]</div><div>it :: Num a => [a]</div><div>λ> :sprint x</div><div>x = _</div><div>λ></div></div><div><br></div><div>I expected to see x = 1 : _</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Best Regards,<div>Boon Hui</div></div></div>
</div></div>