
I see that (!!) for Data.Stream has arguments reversed, compared to !! on lists. The Haddock comment, however, suggests otherwise. Is the argument reversal intended? - Conal
From Data.Stream:
-- | @xs !! n@ returns the element of the stream @xs@ at index -- @n@. Note that the head of the stream has index 0. -- -- /Beware/: passing a negative integer as the first argument will cause -- an error. (!!) :: Int -> Stream a -> a (!!) n (Cons x xs) | n == 0 = x | n > 0 = (!!) (n - 1) xs | otherwise = error "Stream.!! negative argument"

I see that (!!) for Data.Stream has arguments reversed, compared to !! on lists. The Haddock comment, however, suggests otherwise. Is the argument reversal intended?
Well spotted Conal! I've uploaded a new version (0.2.1) to Hackage that fixes this. Thanks for the e-mail, Wouter This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
participants (2)
-
Conal Elliott
-
Wouter Swierstra