First off, to the authors of RWH, thanks for the wonderful book! This
is the first book I've read where I felt like I was back in college
and had an actual professor teaching the subject matter to me! I
think because of the user contributed comments, this book reads much
better than just about any other technical book I have ever read.
To my question, why does tails include the full list as it's first
result? The book says it returns "all of them [the tails]." The
definition of the tail function is to return all but the head of the
list. I would image tails as a recursive call of tail, consing each
result to the next until you reach the end.
myTails :: [a] -> [[a]]
myTails [] = []
myTails (x:xs) = xs : myTails xs
*Main Data.List> myTails [1,2,3]
[[2,3],[3],[]]
Am I alone in my confusion?
BTW, does anyone post to the haskell-cafe or fa.haskll google groups,
or are they read-only groups of the mailing lists?
Thanks,
-Ryan