Is it possible to modify TeX/LaTeX commands so that certain commands are executed before/after a paragraph? For instance, we know that when the LaTeX compiler sees the \par command or a whitespace line, it ends the current paragraph and enters vertical mode (?).
So, I'm looking for a command that I could modify such that I could type
%redefine some commands up here
\begin{document}
Paragraph 1
Paragraph 2
\end{document}
and have it produce the same output as
\begin{document}
$\triangle$Paragraph 1
$\triangle$Paragraph 2
\end{document}
Another related question would be also producing output like
\begin{document}
Paragraph 1$\square$
Paragraph 2$\square$
\end{document}