Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong example #282

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/4.17.15.html
Original file line number Diff line number Diff line change
Expand Up @@ -2329,7 +2329,7 @@ <h4>Arguments</h4>
<h4>Returns</h4>
<p><em>(Function)</em>: Returns the new curried function.</p>
<h4>Example</h4>
<div class="highlight js"><pre><div><span class="type">var</span>&#xA0;<span class="name">abc</span>&#xA0;=&#xA0;<span class="type">function</span>(a<span class="delimiter">,</span>&#xA0;b<span class="delimiter">,</span>&#xA0;c)&#xA0;{</div><div>&#xA0;&#xA0;return&#xA0;[a<span class="delimiter">,</span>&#xA0;b<span class="delimiter">,</span>&#xA0;c];</div><div>};</div><div>&#xA0;</div><div><span class="type">var</span>&#xA0;curried&#xA0;=&#xA0;_<span class="delimiter method">.</span><span class="name">curry</span>(abc);</div><div>&#xA0;</div><div><span class="name">curried</span>(<span class="numeric">1</span>)(<span class="numeric">2</span>)(<span class="numeric">3</span>);</div><div><span class="comment">//&#xA0;=&gt;&#xA0;[1,&#xA0;2,&#xA0;3]</span></div><div>&#xA0;</div><div><span class="name">curried</span>(<span class="numeric">1</span><span class="delimiter">,</span>&#xA0;<span class="numeric">2</span>)(<span class="numeric">3</span>);</div><div><span class="comment">//&#xA0;=&gt;&#xA0;[1,&#xA0;2,&#xA0;3]</span></div><div>&#xA0;</div><div><span class="name">curried</span>(<span class="numeric">1</span><span class="delimiter">,</span>&#xA0;<span class="numeric">2</span><span class="delimiter">,</span>&#xA0;<span class="numeric">3</span>);</div><div><span class="comment">//&#xA0;=&gt;&#xA0;[1,&#xA0;2,&#xA0;3]</span></div><div>&#xA0;</div><div><span class="comment">//&#xA0;Curried&#xA0;with&#xA0;placeholders.</span></div><div><span class="name">curried</span>(<span class="numeric">1</span>)(_<span class="delimiter">,</span>&#xA0;<span class="numeric">3</span>)(<span class="numeric">2</span>);</div><div><span class="comment">//&#xA0;=&gt;&#xA0;[1,&#xA0;3,&#xA0;2]</span></div></pre></div>
<div class="highlight js"><pre><div><span class="type">var</span>&#xA0;<span class="name">abc</span>&#xA0;=&#xA0;<span class="type">function</span>(a<span class="delimiter">,</span>&#xA0;b<span class="delimiter">,</span>&#xA0;c)&#xA0;{</div><div>&#xA0;&#xA0;return&#xA0;[a<span class="delimiter">,</span>&#xA0;b<span class="delimiter">,</span>&#xA0;c];</div><div>};</div><div>&#xA0;</div><div><span class="type">var</span>&#xA0;curried&#xA0;=&#xA0;_<span class="delimiter method">.</span><span class="name">curry</span>(abc);</div><div>&#xA0;</div><div><span class="name">curried</span>(<span class="numeric">1</span>)(<span class="numeric">2</span>)(<span class="numeric">3</span>);</div><div><span class="comment">//&#xA0;=&gt;&#xA0;[1,&#xA0;2,&#xA0;3]</span></div><div>&#xA0;</div><div><span class="name">curried</span>(<span class="numeric">1</span><span class="delimiter">,</span>&#xA0;<span class="numeric">2</span>)(<span class="numeric">3</span>);</div><div><span class="comment">//&#xA0;=&gt;&#xA0;[1,&#xA0;2,&#xA0;3]</span></div><div>&#xA0;</div><div><span class="name">curried</span>(<span class="numeric">1</span><span class="delimiter">,</span>&#xA0;<span class="numeric">2</span><span class="delimiter">,</span>&#xA0;<span class="numeric">3</span>);</div><div><span class="comment">//&#xA0;=&gt;&#xA0;[1,&#xA0;2,&#xA0;3]</span></div><div>&#xA0;</div><div><span class="comment">//&#xA0;Curried&#xA0;with&#xA0;placeholders.</span></div><div><span class="name">curried</span>(<span class="numeric">1</span>)(_<span class="delimiter">,</span>&#xA0;<span class="numeric">3</span>)(<span class="numeric">2</span>);</div><div><span class="comment">//&#xA0;=&gt;&#xA0;[1,&#xA0;2,&#xA0;3]</span></div></pre></div>

</div>
<div>
Expand Down