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

You're going to have to try harder if you want Haskell to outgolf Perl 6 here. The following all work in Pugs and are shorter than your Haskell version.
sub reverseWords ($_) {~reverse .comb} sub reverseWords {~reverse comb @_} my&reverseWords:={~.comb.reverse}
The first two could even be construed as readable.
  • 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 apotheon (Deacon) on Dec 13, 2006 at 08:12 UTC

    If we're really concerned about golfing to the fewest strokes, you should check out the UCBLogo solution in my post down a few in the discussion. In UCBLogo, the number of (key)strokes needed is zero.

    print substr("Just another Perl hacker", 0, -2);
    - apotheon
    CopyWrite Chad Perrin