Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by stvn (Monsignor)
on Dec 12, 2006 at 14:55 UTC ( #589291=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 the OCaml version (utilizing ExtLib):

open ExtLib;; open String;; open List;; let reverse_words s = join " " (rev (remove_all (nsplit s " ") ""));;

-stvn
  • Comment on Re: Five Ways to Reverse a String of Words (C#, Perl 5, Perl6, Ruby, Haskell)
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://589291]
help
Chatterbox?
[james28909]: james28909... failer of the chatterbox
[james28909]: Mojolicious
[james28909]: map
[james28909]: grep
[james28909]: :D

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2017-05-24 23:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?