Skip to content

Commit

Permalink
Docs generated from: fix: don't hang on module expansions (#1340)
Browse files Browse the repository at this point in the history
  • Loading branch information
carp-lang committed Oct 22, 2021
1 parent 975a151 commit 706cbfb
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
44 changes: 44 additions & 0 deletions core/Array.html
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,28 @@ <h3 id="endo-map">

</p>
</div>
<div class="binder">
<a class="anchor" href="#endo-scan">
<h3 id="endo-scan">
endo-scan
</h3>
</a>
<div class="description">
defn
</div>
<p class="sig">
(Fn [(Ref (Fn [(Ref a b), (Ref a c)] a d) e), (Array a)] (Array a))
</p>
<pre class="args">
(endo-scan f xs)
</pre>
<p class="doc">
<p>Like <code>Array.scan</code>, but uses the first element of the array as the starting value.
Also does not create a new array, but reuses the initial one instead (by taking ownership over <code>xs</code>.)</p>
<p>For example, an endo-scan using <code>Int.+</code> over the array [1 1 1 1 1] will return [1 2 3 4 5]</p>

</p>
</div>
<div class="binder">
<a class="anchor" href="#enumerated">
<h3 id="enumerated">
Expand Down Expand Up @@ -1345,6 +1367,28 @@ <h3 id="reverse">

</p>
</div>
<div class="binder">
<a class="anchor" href="#scan">
<h3 id="scan">
scan
</h3>
</a>
<div class="description">
defn
</div>
<p class="sig">
(Fn [(Ref (Fn [(Ref a b), (Ref c d)] a e) f), a, (Ref (Array c) d)] (Array a))
</p>
<pre class="args">
(scan f x xs)
</pre>
<p class="doc">
<p>Similar to <code>Array.reduce</code>, but instead returns an array with the starting element,
and then all intermediate values.</p>
<p>For example, a scan using <code>Int.+</code> over the array [1 1 1 1 1] (starting at 0) will return [0 1 2 3 4 5].</p>

</p>
</div>
<div class="binder">
<a class="anchor" href="#slice">
<h3 id="slice">
Expand Down
21 changes: 21 additions & 0 deletions core/StaticArray.html
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,27 @@ <h3 id="reverse!">

</p>
</div>
<div class="binder">
<a class="anchor" href="#scan!">
<h3 id="scan!">
scan!
</h3>
</a>
<div class="description">
defn
</div>
<p class="sig">
(Fn [(Ref (Fn [a, a] a b) c), (Ref (StaticArray a) d)] ())
</p>
<pre class="args">
(scan! f xs)
</pre>
<p class="doc">
<p>Scans and replaces the array in-place, using a binary function.</p>
<p>For example, give <code>(def numbers [1 1 1])</code>, a <code>scan!</code> using <code>Int.+</code> will mutate <code>numbers</code> to be <code>[1 2 3]</code>.</p>

</p>
</div>
<div class="binder">
<a class="anchor" href="#str">
<h3 id="str">
Expand Down

0 comments on commit 706cbfb

Please sign in to comment.