Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • I thought something like that too, but then why not return position in the list? Commented Dec 17, 2016 at 22:53
  • 2
    Because that would be slightly more work, and probably less useful? Commented Dec 18, 2016 at 0:32
  • 2
    Not to mention that member works on circular lists, where position isn't very useful (plus, you already have position function). I'd imagine Stefan's answer to be at least very close to the truth: it's unlikely there was a grand design for the return value. Just an implementation detail that became a tradition. Commented Dec 18, 2016 at 7:23