ons.chapter" class="level1">
<h1>User-Defined Functions</h1>
<p>Stan allows users to define their own functions. The basic syntax is a simplified version of that used in C and C++. This chapter specifies how functions are declared, defined, and used in Stan.</p>
<section id="function-definition-block" class="level2">
<h2 class="anchored" data-anchor-id="function-definition-block">Function-definition block</h2>
<p>User-defined functions appear in a special function-definition block before all of the other pr