User:Underscore/Scratchpad: Difference between revisions

From Rosetta Code
Content added Content deleted
(Created page with '==Perl 6== ===Features to add once Rakudo implements them=== <ul> <li> Comments: Nested bracketing characters. <li> Creating a Function:<ul> <li>Not quite the same thing …')
 
 
(17 intermediate revisions by the same user not shown)
Line 2: Line 2:
===Features to add once Rakudo implements them===
===Features to add once Rakudo implements them===
<ul>
<ul>
<li> [[100 doors#Perl 6|100 doors]] (and possibly elsewhere): There's gotta be a better way to say <code>@squares[1 .. @squares.end]</code>, possibly using <code>Whatever</code> or a negative number in the subscript. Maybe I should just lobby for the inclusion of Haskell's <code>tail</code> in the setting library.
<li> [[Comments]]: Nested bracketing characters.
<li> [[Creating a Function]]:<ul>
<li> [[Arithmetic Evaluator#Perl 6|Arithmetic Evaluator]]:<ul>
<li> Use <code>make</code> to create a much more digestible parse tree.
<li> <code>my grammar</code>. I'm not certain you're supposed to be able to do that, but I think so.</ul></li>
<li> [[Comments#Perl 6|Comments]]: Nested bracketing characters. </li>
<li> [[Creating a Function#Perl 6|Creating a Function]]:<ul>
<li>Not quite the same thing (see [http://perlcabal.org/syn/S02.html#Return_types Synopsis 2]):
<li>Not quite the same thing (see [http://perlcabal.org/syn/S02.html#Return_types Synopsis 2]):
<lang perl6>sub multiply (Int $a, Int $b) as Int { $a * $b }</lang>
<lang perl6>sub multiply (Int $a, Int $b) as Int { $a * $b }</lang></li>
<li> <code>&multiply := &infix<*>;</code></ul>
<li> <code>&multiply = [*];</code></li>
<li> <code>&multiply = &infix<*>;</code></li></ul></li>
<li> [[Monty Hall simulation#Perl 6|Monty Hall simulation]]:<ul>
<li> <code>:delete</code> adverb.</li>
<li> More trials.</li></ul></li>
<li> [[Trigonometric Functions#Perl 6|Trigonometric Functions]]: The base-switching interface specified in <code>Numeric.pod</code>.
</ul>
</ul>

Latest revision as of 22:04, 31 July 2010

Perl 6

Features to add once Rakudo implements them

  • 100 doors (and possibly elsewhere): There's gotta be a better way to say @squares[1 .. @squares.end], possibly using Whatever or a negative number in the subscript. Maybe I should just lobby for the inclusion of Haskell's tail in the setting library.
  • Arithmetic Evaluator:
    • Use make to create a much more digestible parse tree.
    • my grammar. I'm not certain you're supposed to be able to do that, but I think so.
  • Comments: Nested bracketing characters.
  • Creating a Function:
    • Not quite the same thing (see Synopsis 2): <lang perl6>sub multiply (Int $a, Int $b) as Int { $a * $b }</lang>
    • &multiply = [*];
    • &multiply = &infix<*>;
  • Monty Hall simulation:
    • :delete adverb.
    • More trials.
  • Trigonometric Functions: The base-switching interface specified in Numeric.pod.