[Haskell-cafe] Newbie question

Jerzy Karczmarczuk jerzy.karczmarczuk at unicaen.fr
Sat Jan 15 14:40:16 UTC 2022


Le 15/01/2022 à 15:32, Terry Phelps a écrit :
...
> *last [] = [] *
> (Yes, I know that's not a non-empty list, but I don't want ghci 
> whining about non-exhaustive patterns). Then I added:
>
> *last [x] = x*


Please notice that these two clauses are type-incoherent, unless *x* is 
a list

Jerzy Karczmarczuk



-- 
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20220115/6bf9e9dd/attachment.html>


More information about the Haskell-Cafe mailing list