Functions from $ \kappa $ to $ 2 $ ordered lexicographically I'm wondering how to approach the following exercise:

Suppose $ \kappa \geq \omega $. Consider the set of all functions $ \kappa \rightarrow 2 = \{0,1\} $ ordered lexicographically. Show that there is no strictly increasing sequence of length $ \kappa^+ $ in that set.

I think it's obvious that there is a strictly increasing sequence of length $ \kappa $. Maybe if there was one longer, it would contradict Ramsay's coloring theorem? I'm not sure in which direction to continue
 A: More generally, if $|\alpha|<\operatorname{cf}\lambda$ for a cardinal $\lambda$, then any weakly increasing $\lambda$-sequence in ${^\alpha2}$ is eventually constant. One straightforward proof is by induction on $\alpha$.
Suppose that $|\alpha|<\operatorname{cf}\lambda$, and $\langle f_\xi:\xi<\lambda\rangle$ is such a sequence. For each $\beta<\alpha$ the induction hypothesis ensures that there is an $\eta(\beta)<\lambda$ such that $f_\xi\upharpoonright\beta=f_{\eta(\beta)}\upharpoonright\beta$ for $\eta(\beta)\le\xi<\lambda$. Let $\eta=\sup_{\beta<\alpha}\eta(\beta)<\lambda$, and let $\gamma=\sup_{\beta<\alpha}\beta$; clearly $f_\xi\upharpoonright\gamma=f_\eta\upharpoonright\gamma$ for $\eta\le\xi<\lambda$.
If $\alpha=\gamma$, we’re done. Otherwise $\alpha=\gamma+1$, and either $f_\xi(\gamma)=0$ for $\eta\le\xi<\lambda$, in which case we’re done, or there is an $\eta'$ such that $\eta\le\eta'<\lambda$ and $f_{\eta'}(\gamma)=1$, in which case $f_\xi=f_{\eta'}$ for $\eta'\le\xi<\lambda$.
A: Let $\beta\leq \kappa$ be least such that $\langle g_{\alpha}\restriction \beta:\alpha<\kappa^+\rangle$ is strictly increasing and has size $\kappa^+$. For each $\alpha<\kappa^+$ pick $\beta(\alpha)$ such that $g_{\alpha}\restriction \beta(\alpha)=g_{\alpha+1}\restriction \beta(\alpha)$ and $g_{\alpha}(\beta(\alpha))=0, g_{\alpha+1}(\beta(\alpha))=1$. For each $\alpha<\kappa^+$ we have $\beta(\alpha)<\beta$. Now to show there can't be any strictly increasing sequence of length $\kappa^+$, define $h:\kappa^+\to \beta$ by $h(\alpha)=\beta(\alpha)$ and notice that this function must be constant on a set of size $\kappa^+$, because if not, then letting $A_{\alpha}=\{\gamma<\kappa^+:h(\gamma)=\alpha\}$ of size at most $\kappa$ for every $\alpha$, we have $\kappa^+=\bigcup_{\alpha<\beta} A_{\alpha}$ and so $\kappa^+<\kappa$.
