doc/classes/Proc.html in prelude-0.0.2 vs doc/classes/Proc.html in prelude-0.0.3

- old
+ new

@@ -84,12 +84,12 @@ <div id="method-list"> <h3 class="section-bar">Methods</h3> <div class="name-list"> - <a href="#M000004">&lt;&lt;</a>&nbsp;&nbsp; - <a href="#M000003">curry</a>&nbsp;&nbsp; + <a href="#M000006">**</a>&nbsp;&nbsp; + <a href="#M000005">curry</a>&nbsp;&nbsp; </div> </div> </div> @@ -98,66 +98,91 @@ <div id="section"> + <div id="aliases-list"> + <h3 class="section-bar">External Aliases</h3> + <div class="name-list"> + <table summary="aliases"> + <tr class="top-aligned-row context-row"> + <td class="context-item-name">call</td> + <td>-&gt;</td> + <td class="context-item-value">~</td> + </tr> + <tr class="top-aligned-row context-row"> + <td>&nbsp;</td> + <td colspan="2" class="context-item-desc"> +Syntaxic sugar for something like this: ~head(list), i.e., gives actual +head instead of proc that can do it if called. +</td> + </tr> + </table> + </div> + </div> + + <!-- if method_list --> <div id="methods"> <h3 class="section-bar">Public Instance methods</h3> - <div id="method-M000004" class="method-detail"> - <a name="M000004"></a> + <div id="method-M000006" class="method-detail"> + <a name="M000006"></a> <div class="method-heading"> - <a href="#M000004" class="method-signature"> - <span class="method-name">&lt;&lt;</span><span class="method-args">(*args)</span> + <a href="#M000006" class="method-signature"> + <span class="method-name">**</span><span class="method-args">(*args)</span> </a> </div> <div class="method-description"> <p> -This is will serve as an infix composition operator +This is will serve as an infix composition operator for procs. If between +two procs, returns composition proc, executes left proc otherwise. </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000004-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000004-source"> + onclick="toggleCode('M000006-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000006-source"> <pre> - <span class="ruby-comment cmt"># File lib/prelude.rb, line 55</span> -55: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">&lt;&lt;</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) -56: <span class="ruby-keyword kw">if</span> (<span class="ruby-value">1</span><span class="ruby-operator">==</span><span class="ruby-identifier">args</span>.<span class="ruby-identifier">length</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Proc</span>) -57: <span class="ruby-identifier">proc</span> {<span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">a</span>)) } -58: <span class="ruby-keyword kw">else</span> -59: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>.<span class="ruby-identifier">flatten</span>) -60: <span class="ruby-keyword kw">end</span> -61: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File lib/prelude.rb, line 99</span> + 99: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">**</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) +100: <span class="ruby-keyword kw">if</span> (<span class="ruby-value">1</span><span class="ruby-operator">==</span><span class="ruby-identifier">args</span>.<span class="ruby-identifier">length</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Proc</span>) +101: <span class="ruby-identifier">lambda</span> {<span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">a</span>)) } +102: <span class="ruby-keyword kw">else</span> +103: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>.<span class="ruby-identifier">flatten</span>) +104: <span class="ruby-keyword kw">end</span> +105: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> - <div id="method-M000003" class="method-detail"> - <a name="M000003"></a> + <div id="method-M000005" class="method-detail"> + <a name="M000005"></a> <div class="method-heading"> - <a href="#M000003" class="method-signature"> + <a href="#M000005" class="method-signature"> <span class="method-name">curry</span><span class="method-args">(one, *args)</span> </a> </div> <div class="method-description"> + <p> +FIXIT +</p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000003-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000003-source"> + onclick="toggleCode('M000005-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000005-source"> <pre> - <span class="ruby-comment cmt"># File lib/prelude.rb, line 50</span> -50: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">curry</span>(<span class="ruby-identifier">one</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) -51: <span class="ruby-identifier">proc</span>{ <span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">one</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)} -52: <span class="ruby-keyword kw">end</span> + <span class="ruby-comment cmt"># File lib/prelude.rb, line 93</span> +93: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">curry</span>(<span class="ruby-identifier">one</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) +94: <span class="ruby-identifier">lambda</span> { <span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">one</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)} +95: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> \ No newline at end of file