Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: ancient masterpiece

by Roy Johnson (Monsignor)
on Jun 02, 2005 at 22:27 UTC ( #463041=note: print w/ replies, xml ) Need Help??


in reply to Re (tilly) 1 (perl): What Happened...(perils of porting from c)
in thread What Happened...(perils of porting from c)

That was beautiful. I'm writing primarily so more people can see it. I also did a little rewrite that isn't an improvement, per se, but is AWTDI and may help people understand what's going on. (Iterating instead of recursing.)

sub ret_iter { my $sub = shift; while (my $range = pop) { my $inner = $sub; $sub = sub { $inner->(@_, $_) for @$range }; } return $sub; }
I made it so it changes elements on the right fastest, like a counter.

Caution: Contents may have been coded under pressure.


Comment on Re: ancient masterpiece
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2015-07-28 01:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (251 votes), past polls