ay">\[
\textsf{triangle}(y \mid -1, 1) \propto 1 - |y|.
\]</span> Consider the following Stan implementation of <span class="math inline">\(\textsf{triangle}(-1,1)\)</span> for sampling.</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode stan code-with-copy"><code class="sourceCode stan"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="kw">parameters</span> {</span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">real</spa