Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Five Ways to Reverse a String of Words (C#, Perl 5, Perl6, Ruby, Haskell)

by stvn (Monsignor)
on Dec 12, 2006 at 15:27 UTC ( #589295=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    function (orig, i, acc) {  
        if (i > orig.length) return acc;
        if (orig[i] != "") acc[acc.length] = orig[i];
        return arguments.callee(orig, (i + 1), acc);
    }("  one   two three four    ".split(" ").reverse(), 0, []).join(" ")
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://589295]
help
Chatterbox?
[zentara]: I'm listening to 20,000 Tibetan monks chant Om Mani Padme Hum
[zentara]: I've decided the first words I will utter when I'm born into that other world..... Hari Om :-)
[LanX]: I forgot my mantra

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2017-05-24 21:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?