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

A Tcl version:
#!/usr/bin/tclsh proc reversewords {str} { proc rev {a b} {return 1} return [join [lsort -command rev [regexp -all -inline -- {\S+} $st +r]]] } puts "<<[reversewords { one two three four }]>>"
--
AltBlue.
  • Comment on Re: Five Ways to Reverse a String of Words (C#, Perl 5, Perl 6, Ruby, Haskell)
  • Download Code