Intuition regarding sequence functions I'm working my way through Halmos and am struggling with his explanation of transfinite recursion.  Specifically, I'm getting stuck on his definition of a "sequence function," and I was hoping someone here could help me build some intuition around it.
Halmos says:

A sequence function of type $W$ in $X$ is a function $f$ whose domain consists of all sequences of type $a$ in $X$, for all elements $a$ in $W$, and whose range is included in $X$.  Roughly speaking, a sequence function tells us how to "lengthen" a sequence; given a sequence that stretches up to (but not including) some element of $W$ we can use a sequence function to tack on one more term.

Now, based on Halmos's earlier explanation, a "sequence function of type $W$ in $X$" is a function from some initial segment of $a$ (where $a$ $\in$ $W$ and $W$ is well-ordered) into $X$.  So, as I understand it, if W is a well-ordered set $\{a,b,c,d\}$ where the ordering is alphabetical, and $X$ is an arbitrary set, say $\{1,2,3,4,5\}$, then an example of "a sequence of type $c$" would be a function $f$ such that:
$$
f(a)=1, f(b)=3, f(c)=5
$$
Similarly, another example of a "sequence of type $c$" would be a function g such that
$$
g(a)=2, g(b)=3, g(c)=4
$$
This is where I get stuck.  How do you go from here to a "sequence function of type $W$ in $X$".  I see that the domain is supposed to be $\{ f, g, etc...\}$ where "etc..." is any other sequences of type $W$ in $X$, and the domain is some $Y$ where $Y \subseteq X$.  But I don't really have any intuition of what that function is or how it can be used to "lengthen" a sequence.
I've also read through this answer a few times and I believe this bit is capturing the same point:

Now,  is a method for extending a partial function "one step further": if I feed  a map :→ for some <,  tells me what () "ought" to be given that =↾. That is, if I've defined  for the first -many inputs,  tells me how to define  for the next input.

But here too I similarly am not understanding the "one step further" notion.
Can someone provide me some examples that clarify how "sequence functions" work?
EDIT:
I'm still struggling with the "lengthen" or "tack on" concept behind sequence functions, but I think I have a better understanding of what a sequence function is.
Later on in the chapter on transfinite recursion, Halmos provides an example of a sequence function in proving the comparability theorem for well-ordered sets.  Specifically, he defines that, for two well ordered sets $X$ and $Y$, if $x \in X$ and $t$ is a sequence of type $x$ in $Y$, then let $f$ be a function from $t$ to the supremum of the range of $t$, if one exists, otherwise, to the least member of $Y$.  $f$, he explains, is a sequence function.
So building on the example above, if $X = \{ a, b, c, d, e, f, g\}$ (ordered alphabetically) and $Y = \{1, 2, 3, 4, 5, 6, 7 \}$ (ordered numerically), we can give an example of a sequence function as follows:

*

*Let $M$ be a function from $X$ onto $Y$ that simply maps $a$ to $1$, $b$ to 2, etc.

*Let $t$ be a sequence of type $x$ in $Y$ defined as the restriction of $M$ to the initial segment of $x$ for any $x \in X$.  So, for example, $t$ for $c$ would be $\{(a,1),(b,2),(c,3)\}$ and $t$ for $d$ would be $\{(a,1),(b,2),(c,3),(d,4)\}$

*Let $f$ be a function from any $t$ to to the supremum of the range of $t$, so, for example, $f(t$ for $c) = 3$ and $f(t$ for $d) = 4$ etc.

As I understand it, $f$ is a sequence function because it maps any "sequence of type $x$", e.g., $t$ for $a$, $t$ for $b$, etc., into $Y$.  Or, to use Halmos's language, the domain of $f$ is all sequences of type $x$ in $Y$ and the range of $f$ is a subset of $Y$.
That all makes sense to me (did I get it right?).  And it's probably enough to keep going in Halmos.  But I would still love to understand the intuition behind this notion that $f$ lengthens or tacks-on to a sequence.  I just don't see it in this example. $f$ doesn't seem to me to lengthen any sequence, or even to go from one sequence to another.  It simply maps a sequence to an element of $Y$.  What am I missing?
 A: Halmos' statement of the transfinite recursion theorem shows you how a sequence function can be used to intuitively "lengthen" or "tack on" new elements to a sequence:

Transfinite recursion theorem. If $W$ is a well ordered set, and if $f$ is a sequence function of type $W$ in a set $X$, then there exists a unique function $U$ from $W$ into $X$ such that $U(a)=f(U^a)$ for each $a$ in $W$.

The important part is
$$U(a)=f(U^a)$$
Here $U^a$ denotes the restriction of $U$ to the initial segment $s(a)$ of $a$ in $W$. Importantly,
$$s(a)=\{\,x\in W\mid x<a\,\}$$
does not include $a$ itself! So the function $f$ determines the behavior of $U$ at any element $a$ from the behavior of $U$ at values strictly less than $a$. Informally, given the sequence defined by $U$ up to but not including $a$ in $W$, $f$ tells us how to "lengthen" the sequence by "tacking on" the new element $U(a)$ at $a$.
Note this is all just an extension of ordinary recursion on the natural numbers, where we use a function to "tack on" a new value at $n+1$ given as input the value assigned at $n$.
