
2 Feb
2007
2 Feb
'07
7:28 a.m.
On Thu, 2007-02-01 at 21:01 -1000, Tim Newsham wrote:
instance Second [a] a where snd [] = error "don't got none" snd (x:y:xs) = y
Would'nt that instance mean this: snd [] produces error snd [x] gives [] I'd implement it something like this (if this works?): instance Second [a] (Maybe a) where snd [] = Nothing snd [x] = Nothing snd (x:y:xs) = Just y