Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re^2: Rosetta PGA-TRAM

by John M. Dlugosz (Monsignor)
on Jun 17, 2009 at 22:53 UTC ( #772571=note: print w/replies, xml ) Need Help??

in reply to Re: Rosetta PGA-TRAM
in thread Rosetta PGA-TRAM

I notice your use of the indirect object form at the very end to avoid parens around (just) brackets. But didn't do so in the other place, because it's not at the end. Moving one paren doesn't make it much better. But you could use feed notation and lose the parens in both places:
$result= ( $x.split('') ==> map { %rtoa{$_.uc} } ==> reduce { $^a+$^b +-$a%$b*2 } );
but you still wind up with one paren after a brace. Or if you reversed the written order, so "everything to the right" is indeed the argument to the listop, I think this works:
reduce {$^a+$^b-$a%$b*2 } map { %rtoa{$_.uc} } $x.split('');
which makes me think that there is merit in doing it that way as originally presented. listops are naturally written with the processing sequence in the opposite order. Fighting it means adding parens, no matter how you try.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://772571]
[choroba]: Yeah, my wife sent me some pictures of the children yesterday, and there was snow all around. 10 days in Saigon and I totally forgot what weather they have back there.
[stevieb]: We've had so much snow here this year that the whole area is pretty much under constant avalanche warnings (and avalanches pretty much daily all over the place)

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (11)
As of 2017-02-23 17:21 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (350 votes). Check out past polls.