&gt; I don&#x27;t see much of an alternative to panic on bounds checked indexing error<p>Returning an Option. That&#x27;s what Elm does:<p><pre><code>    head : List a -&gt; Maybe a

    get : Int -&gt; Array a -&gt; Maybe a
</code></pre>
It tends to drive people towards not indexing collection (which is often good).