Next | You can't get there from here | 27 |

For example, suppose you have written a function to calculate squares

sub square_a { my $x = shift; return $x * $x; }

The guy in the next cubicle wrote one too:

# VALUES OF BEETA GIVE RISE TO DOM sub square_b { my $fOOooO = shift() + 1; return exp(2*log($fOOooO)) - ($fOOooO - 1) - $fOOooO; }

Is it correct?

It passes all the tests, but that doesn't prove anything

Let's write a function that examines the source code of another function

And returns true if and only if the code is for calculating squares!

continued...

Next
Copyright © 2005 M. J. Dominus