Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by moklevat (Priest)
on Dec 12, 2006 at 19:57 UTC ( #589384=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    reverseWords <- function(words) {
         return( sort( words, decreasing=TRUE))
    }
    
  2. or download this
    reverseWords <- function(words) {
      return( paste( rev( unlist( strsplit( words, split=" "))), sep=" ", 
    +collapse=" "))
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://589384]
help
Chatterbox?
[karlgoethebier]: shmem: This repertoire is a real challenge.
Discipulus mwhwhaa..
[Discipulus]: sucked in traslation.. was'nt a movie?
[karlgoethebier]: adds "Der abenteuerliche Simplicissimus" by Hans Jakob Christoffel von Grimmelshausen
Corion joins another telephone call :-/
[Discipulus]: also The Life and Opinions of the Tomcat Murr
[Discipulus]: I dunno if i can read Dumas in french.. must try some chapter to see

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (12)
As of 2017-05-24 08:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?