Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Perl: the Markov chain saw
 
PerlMonks  

Re: Adding 2 + 2

by I0 (Priest)
on Dec 30, 2000 at 13:33 UTC ( [id://48981]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Adding 2 + 2

sub S{ return [shift]; } sub P{ return (shift)->[0]; } sub add{ my($x,$y) = @_; return $x unless $y; return add(S($x),P($y)); } sub arabic{ my $x = shift; return 0 unless $x; return 1+arabic(P($x)); } $y=$x = S S; print arabic($x),"+",arabic($y),"=",arabic(add($x,$y)),"\n";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://48981]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.