Hi,
I'm a really beginner to haskell and I have a question about using classes.
I don't now really what this function does. So I will try to use it to see
what it will put out
position :: ( Enum a , Eq b ) => b -> [b] -> [a]
position x = position_snd . zip ( enumFrom $ toEnum 1 )
where position_snd [] = []
position_snd ((p,y):ys) | x == y = p : position_snd ys
| otherwise = position_snd ys
My roblem is now that I don't know how to use it.
I tried "head position 2 [1,2,3,4]" but I always get an error.
Thanks for help
Andr�
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe