Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by Arunbear (Parson)
on Dec 12, 2006 at 14:28 UTC ( #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
Node Status?
node history
Node Type: note [id://589282]
help
Chatterbox?
[beech]: nobliest nodes
[Discipulus]: ah no newest nodes! ask something
[beech]: why is my butt itchy
Discipulus many countries without bidet.. is a big problem!
[beech]: who told you i call my butt france?
Discipulus ??
beech waves a white flag -- no detectible causes of itch

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2016-12-09 09:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (150 votes). Check out past polls.