Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^2: Pugs now works - but how?

by awwaiid (Friar)
on Feb 18, 2005 at 23:20 UTC ( #432567=note: print w/replies, xml ) Need Help??

in reply to Re: Pugs now works - but how?
in thread Hello Perl 6. Running pugs on Windows

Perhaps also helpful is the close equivalent in Perl5. No magical multi-methods, and a bit more verbose... but not too shabby. Come to think of it this should work fine in Perl6 as well, eh?

sub quicksort { return unless @_; my ($x, @xs) = @_; my @pre = grep{ $_ < $x } @xs; my @post = grep{ $_ >= $x } @xs; (quicksort(@pre), $x, quicksort(@post)); } my @a = quicksort(1, 5, 2, 4, 3); print "@a\n";

Replies are listed 'Best First'.
If only I could vote twice...
by rg0now (Chaplain) on Feb 19, 2005 at 23:41 UTC
    or more on a node, then I would immediately upvote both parents multiple times! These two were just the kind of enlightning nodes for which I like and regularly visit Perl Monks. This opened up a completely new way of thinking of programming for me...

    Starting along the reply of awwaiid and pernod I have just finished the refactoring of one of my previous modules. The code is now much more concise, short and, perhaps most importantly, efficient as before. Thank you very much...


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2021-09-22 23:39 GMT
Find Nodes?
    Voting Booth?

    No recent polls found