Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
What's with tails?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
rzezeski@gmail.com  
View profile  
 More options Jun 1 2009, 11:31 pm
From: "rzeze...@gmail.com" <RZeze...@gmail.com>
Date: Mon, 1 Jun 2009 20:31:41 -0700 (PDT)
Local: Mon, Jun 1 2009 11:31 pm
Subject: What's with tails?
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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »