Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by Arunbear (Prior)
on Dec 12, 2006 at 14:28 UTC ( [id://589282]=note: print w/replies, xml ) Need Help??


in reply to Five Ways to Reverse a String of Words (C#, Perl 5, Perl 6, Ruby, Haskell)

Here is a Lisp version (not much improvement on Perl/Ruby):
newLISP v.9.0 on Win32 MinGW. > (define (reverseWords s) (join (reverse (parse s)) " ")) (lambda (s) (join (reverse (parse s)) " ")) > (reverseWords " one two three four ") "four three two one"
Do you ever wonder if the future is Haskell (e.g. you can write Perl6 in it)?
  • Comment on Re: Five Ways to Reverse a String of Words (C#, Perl 5, Perl6, Ruby, Haskell)
  • Download Code

Replies are listed 'Best First'.
Re^2: Five Ways to Reverse a String of Words (C#, Perl 5, Perl6, Ruby, Haskell)
by bennymack (Pilgrim) on Dec 12, 2006 at 15:07 UTC
    When at the barrel of a gun...

      or when busy writing an haskell compiler in perl6...;)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://589282]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-04-19 11:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found