
The first one means that you gave a type signature for a function you did
not define.
The second one means that there are 2 last2 type signature, but you can
only have one.
What you want is something like :
last2 :: [a] - > a
last2 list = (put your function here)
On Sun, 9 Nov 2014 21:02 Roelof Wobben
Thanks,
I changed it to this :
last2::[a]-> a last2::last[a]
but now I see these error messages:
src/Main.hs@1:1-1:6 The type signature forlast2 lacks an accompanying binding src/Main.hs@2:1-2:6 Duplicate type signatures for last2 at /home/app/isolation-runner-work/projects/75679/session.207/src/src/Main.hs:1:1-5
/home/app/isolation-runner-work/projects/75679/session.207/src/src/Main.hs:2:1-5 src/Main.hs@2:1-2:6 The type signature for last2 lacks an accompanying binding
akash g schreef op 9-11-2014 10:48:
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
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@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@haskell.org http://www.haskell.org/mailman/listinfo/beginners
_______________________________________________ Beginners mailing listBeginners@haskell.orghttp://www.haskell.org/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners