div class="code-block"><span class="keyword">def</span> rexp(rate<span class="symbol">:</span> <span class="type-name">Float</span>) <span class="symbol">-&gt;</span> (<span class="type-name">Key</span>) <span class="symbol">-&gt;</span> <span class="type-name">Float</span> <span class="symbol">=</span> <span class="symbol">\</span>k<span class="symbol">.</span> log1p (<span class="symbol">-</span>rand k) <span class="symbol">/</span> <span class="symbol">-</span>rate
</div></div><div class="cell"><div clas