[Haskell-beginners] invalid type signature last2::: [a] -> a

akash g akaberto at gmail.com
Sun Nov 9 09:48:59 UTC 2014


The naming convention for variables and functions is that they should start
with a lower case letter.  Types have capitalized names.


On Sun, Nov 9, 2014 at 3:12 PM, Roelof Wobben <r.wobben at home.nl> wrote:

>
>
>
>
>
>
>
>
>
>
>
>
>
> Hello,
>
> I try to solve the 99 haskell problems on several ways.
>
> But my first try which looks like this :
>
> Last2::[a]-> a
> Last2:: last[list]
>
> gives the following error message :
>
> src/Main.hs at 1:1-1:6
> Invalid type signature: Last2 :: [a] -> a Should be of form <variable>
> :: <type>
>
> What am trying to do is say the input is a list which can be of integers
> or chars so everything is the output can then also be of type everything.
>
> Roelof
>
>
>
>
>
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20141109/a4a4daa8/attachment.html>


More information about the Beginners mailing list