Using TikZ and pgf versions v3.1.9a (3.1.9a), I tried to compile the following code
\documentclass[tikz,border=5]{standalone}
\usetikzlibrary{trees,mindmap}
\tikzset{grow cyclic list/.code={%
\def\tikzgrowthpositions{{#1}}%
\foreach \n [count=\i,remember=\i]in {#1}{}%
\let\tikzgrowthpositionscount=\i%
\tikzset{growth function=\tikzgrowcycliclist}}}
\def\tikzgrowcycliclist{%
\pgftransformshift{%
\pgfpointpolar{\tikzgrowthpositions[mod(\the\tikznumberofcurrentchild-1,\tikzgrowthpositionscount)]}%
{\the\tikzleveldistance}}}
\begin{document}
\begin{tikzpicture}[small mindmap, concept color=blue!20,
every child node/.style={concept}]
\node [concept] (languages)
{O} [grow cyclic list={90,0,-45,210}]
child { node {A} }
child { node {B} }
child { node {C}
[clockwise from=0, sibling angle=45]
child { node {C1} }
child { node {C1} }
child { node {C1} }
}
child { node {D} };
\end{tikzpicture}
\end{document}
which is a part of the Mark Wibrow's answer here. But it throws the following error:
Argument of \pgfmath@dimen@@ has an extra }. ^^Ichild { node {D} };
Does anybody know how to resolve it?

remembervariables persist outside the loop, which is fixed in newer TikZ version. – user202729 Jul 20 '22 at 08:31