Hello Peter, Thursday, September 7, 2006, 11:02:12 AM, you wrote:
> [10] test :: [(Int, Double)] -> Int > [11] test [(i,v):ps] = i test ((i,v):ps) = i your mistake was using for grouping [] instead of () [] should be used only with ',' or '..': [1,2,3] [(1,0.7), (2,0.8)] [1..10] (x:xs) means constructing list from element representing head of new list and old list representing all remaining elements [x:xs] is equivalent to [(x:xs)] and means constructing singleton (one-element) list which only element is another list, namely (x:xs). so, you got list of lists ps: btw, it's better to ask newbie questions in haskell-cafe list -- Best regards, Bulat mailto:[EMAIL PROTECTED] _______________________________________________ Hugs-Users mailing list Hugs-Users@haskell.org http://www.haskell.org/mailman/listinfo/hugs-users