I have a simple haskell program that returns the index of a specific number (say variable "i" from "mylist", and should return the index like.. "(Ind i)". "Num" is of type Int. nums is declared as a list.
This may be easy for some, but could you help me, what is wrong with my simple code? It says "parse error on input `)'".
list1 :: Int -> Int
list1 (Num i) = (do let j = [nums] !! i; return (Ind j));
....
I'm a newbie in haskell. :( help!
do
construct and monads in general. Get used to the pure functional style first. - ThomasNum
andInd
yourself? Please show those datatypes/constructors - Bergi