>>>>> "DC" == Damian Conway <[EMAIL PROTECTED]> writes:
DC> Here are a few of the things I'll be using reductions for in Perl 6... DC> 3. To drill down a hierarchical data structure, following the path DC> specified by a list of keys: DC> $leaf_value = [.{}] %hash, @keys; so that would be expanded how? i read it as: [EMAIL PROTECTED]@keys[1]} ... but how is . being used? how does the {} wrap each key instead of being between each one? also can it be used as an lvalue (that would be useful too in setting a hash from a list of keys)? DC> 4. To compute RMS values: DC> $RMS = sqrt [+] @samples »** 2 are those RMS values under the GPL? :) DC> 6. As a cleaner form of C<< join.assuming(:sep<>) >>: DC> $joined = [~] @strings; i like that. can that be done in a "" string (without $() or whatever the expression interpolator is now)? DC> 9. To retrieve the first defined value in a list: DC> $first_def = [//] @list; that is a good one for initializing stuff. it should become an idiom like ||= is now. for those single ops it reads pretty well. if you choose to use it with multiple levels of hyper/reduce, it should be well commented. uri -- Uri Guttman ------ [EMAIL PROTECTED] -------- http://www.stemsystems.com --Perl Consulting, Stem Development, Systems Architecture, Design and Coding- Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org