Repeat is defined as follows:
repeat :: a -> [a]
repeat x = xs where xs = x:xs
Is there any reason that the following isn't used?
repeat :: a -> [a]
repeat x = x : repeat x
(Obviously there are many equivalent definitions for many Prelude functions, but my latter description just feels much more obvious. I wonder if there's a performance or style reason for the way it is.)