liveBook · Manning

Tail

A tail is the remaining or terminal part of a structured sequence or the endpoint of a linked relation.

How 3 Manning books explain it

Grokking Data Structures

The tail is the reference or position identifying the last node of a linked list.

How it is used
Uses the tail to identify and efficiently update the end of linked lists.
How deep it goes
Explains tail semantics, constant-time end insertion, backward traversal, and deletion updates, but does not formalize implementation invariants.
Examples
Shows Python append and deletion implementations that assign, advance, or clear the tail.
What you can do after
Build it from scratch by maintaining tail references during linked-list insertion and deletion.

Read how Grokking Data Structures explains tail →

Functional Programming in Scala, Second Edition

tail is a list operation that returns all elements except the first, failing when applied to Nil.

How it is used
Uses persistent list structure to remove the first element without mutation or copying.
How deep it goes
Explains constant-time removal and the Nil failure case, but defers alternative error-handling techniques.
Examples
Uses Cons(x, xs), mylist, and the shared structure illustrated by Figure 3.3.
What you can do after
Build it from scratch as a constant-time operation over the custom Scala List type.

Read how Functional Programming in Scala, Second Edition explains tail →

Elixir in Action, Third Edition

The tail of a list is the remainder following its first element in a head-and-tail representation.

How it is used
Uses the tail to expose list structure for traversal and decomposition.
How deep it goes
Explains recursive structure and extraction with tl/1, but defers recursive algorithms and detailed complexity analysis.
Examples
Demonstrates [1, 2, 3, 4], [head | tail], and tl([1, 2, 3, 4]).
What you can do after
Apply tl/1 to obtain the remainder of a nonempty list and recognize its head-and-tail form.

Read how Elixir in Action, Third Edition explains tail →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.