X-Git-Url: https://git.rkrishnan.org/?p=sicp.git;a=blobdiff_plain;f=src%2Fsicp%2Fex4_29.rkt;fp=src%2Fsicp%2Fex4_29.rkt;h=1c1a976e407efaf54209360c478ed2c444e9488d;hp=0000000000000000000000000000000000000000;hb=c6a6e187ad34b393587f51d181e2751f82f41aff;hpb=185aeca90595562fd31b2cdb730a12488d155348 diff --git a/src/sicp/ex4_29.rkt b/src/sicp/ex4_29.rkt new file mode 100644 index 0000000..1c1a976 --- /dev/null +++ b/src/sicp/ex4_29.rkt @@ -0,0 +1,11 @@ +#lang racket + +#| + +Any program which will call itself or another function recursively or repeatedly (as another argument) +will benefit from memoization. + +non-memoized version will have count of 2 as x gets forced twice in the expression (* x x). In memoized +version, it will be 1. + +|# \ No newline at end of file