I'm using this symbol (defined by Steven B. Segletes here) to denote a special type of function definition:
\newcommand*\diamondarrow{%
\stackengine{0pt}{\hspace{.83ex}$\rightarrow$}{$\diamond$}{O}{l}{F}{F}{L}}
I have noticed that when used in subscript it does not scale (should it, right?). How can I make it scaling automatically?
\documentclass{article}
\usepackage{stackengine}
\usepackage{scalerel}
\newcommand*\diamondarrow{%
\stackengine{0pt}{\hspace{.83ex}$\rightarrow$}{$\diamond$}{O}{l}{F}{F}{L}}
\begin{document}
$A \diamondarrow B_{C \diamondarrow D_{E \diamondarrow F}}$
\end{document}