Here is a TikZ solution that has built-in extensiblity with an optional argument. You can adjust the size and angle of the arrowhead by changing single arrow head extend
and single arrow tip angle
\documentclass{article}
\usepackage{tikz, amsmath}
\usetikzlibrary {shapes.arrows}
\newcommand{\myarrow}[1][]{\mathrel{\tikz{
\node[fill, minimum width=.5ex, minimum height=.9em, inner sep=0pt, single arrow, single arrow head extend=2pt, single arrow tip angle=60]
(A){\raisebox{3.5pt}[0pt][0pt]{$\,\scriptstyle #1\ $}}; \path([xshift=-.4pt]A.west)--(A.east);}}}
\newcommand{\myarrowleft}[1][]{\mathrel{\tikz{
\node[fill, minimum width=.5ex, minimum height=.9em, inner sep=0pt, single arrow, single arrow head extend=2pt, single arrow tip angle=60, shape border rotate=180]
(A){\raisebox{3.5pt}[0pt][0pt]{$\ \scriptstyle #1\,$}}; \path(A.west)--([xshift=.4pt]A.east);}}}
\begin{document}
$A\to B\qquad A\xrightarrow{f\circ g}B$
$A\myarrow B\qquad A\myarrow[f\circ g] B$
$A\myarrowleft B\qquad A\myarrowleft[f\circ g] B$
\end{document}
mathabx
? They aren't exactly triangles, but more "filled" than the normal ones. If you want real triangles, theboisik
package has\rightarrowTriangle