My favorite Erlang program (2013)
Unfortunately, Erlang does <i>not</i> directly implement Actor behavior change.<p>Consequently, Erlang cannot directly implement Actor behavior change.  A factorial server is implemented below:<p><pre><code>    FactorialServer[ ] *implements* ProcedureServer&lt;[NaturalNumber], NaturalNumber&gt;
     [i] |-&gt;           &#x2F;&#x2F; received message [i]
        Factorial.[i]  &#x2F;&#x2F; return result of sending [i] to Factorial
</code></pre>
In order to implement Actor behavior change, Erlang must resort to using helper processes that trampoline back so that helper processes can return the desired change.<p>See the following for direct implementation of Actor behavior change:<p><pre><code>    https:&#x2F;&#x2F;papers.ssrn.com&#x2F;abstract=3418003
</code></pre>
PS. The type ProcedureServer above can be defined as follows:<p><pre><code>    ProcedureServer&lt;t1, t2&gt; ≡ &#x2F;&#x2F; Procedure server with parameters types t1 and t2 is defined to be
        t1 -&gt; t2 &#x2F;&#x2F; type of procedure from t1 into t2</code></pre>