Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
viebel committed Nov 4, 2016
1 parent 49847ec commit f9c1f8d
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions resources/public/plugin-dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,30 @@ <h2> Dealing with errors </h2>

</code></pre>

<h2> Dealing with infinite loops </h2>
<p> Infinite loops in user code are stopped after 1 second</p>
<pre><code class="clojure">
(loop []
(recur))
</code></pre>

<p> This is done by inserting <code>guard()</code> in each <code>if</code> and <code>recur</code>. You can see it by setting <code>data-compile-display-guard="true"</code>.</p>
<pre><code class="clojure-js" data-compile-display-guard="true">
(loop [x 1]
(if (not= x 19)
(recur x)
(str "hello" 199)))
</code></pre>

<p> But by default, the transpiled js is not altered </p>

<pre><code class="clojure-js">
(loop [x 1]
(if (not= x 19)
(recur x)
(str "hello" 199)))
</code></pre>


<h2> Dealing with infinite sequences </h2>
<p>Sequences are cropped. At most we print 1000 elements.<br>
Expand Down

0 comments on commit f9c1f8d

Please sign in to comment.