Is there an error in my code or did I find a bug? It seems like the \foreach statement doesn’t increase \lastn if there is an initally (value) but it works with a manually given initially value (\def\lastn).
This is what I expect …

… and that is what I get …

Here is my MWE:
\documentclass[border=1cm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[every node/.style={draw}]
\node (A) at (0,0) {A};
\node (B) at (2,0) {B};
\node (C) at (4,0) {C};
\node (D) at (6,0) {D};
% DOESN'T WORK
% \foreach \n [remember=\n as \lastn (initially A)] in {B,C,D} {
% \draw [->] (\lastn) -- (\n);
% }
% WORKS
\def\lastn{A}
\foreach \n [remember=\n as \lastn] in {B,C,D} {
\draw [->] (\lastn) -- (\n);
}
\end{tikzpicture}
\end{document}

{B,C,D}with{B,...,D}also works correct. – Qrrbrbirlbel Oct 29 '12 at 17:20PGF/TikZ bug tracker – Qrrbrbirlbel Oct 29 '12 at 17:28