User:Underscore/Scratchpad: Difference between revisions

From Rosetta Code
Content added Content deleted
No edit summary
Line 2: Line 2:
===Features to add once Rakudo implements them===
===Features to add once Rakudo implements them===
<ul>
<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> [[Comments#Perl 6|Comments]]: Nested bracketing characters. </li>
<li> [[Creating a Function#Perl 6|Creating a Function]]:<ul>
<li> [[Creating a Function#Perl 6|Creating a Function]]:<ul>

Revision as of 14:24, 8 November 2009

Perl 6

Features to add once Rakudo implements them

  • 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.
  • Playing Cards: There really ought to be something like EnumerationType.pick(*) that gives you the values of the enumeration in order. You'd think Two .. Ace would do it, but as of Rakudo release #22, that produces numbers, not Pips.
  • True/False Values: 0 but True.