My solutions to the exercises in Structure and Interpretation of Computer Programs.
Felix Martin
d25e14aaa2
This took way longer than expected. First, I noticed that mixed up sparse and dense terms so I fixed that. Then I extended the rational package to use generic operations. However, I did not work and it took me two hours to find the root cause. The problem was that appply-generic tried to raise raise and drop the rationals with polynomials. The rational to scheme and rational to real procedures do not support polynomials which caused the error. I changed these procedures so that they only attempt coercion of the arguments are numbers. This is not fully correct as it destroys our ability to have rationals of rationals, for example, but good enough for our purposes. |
||
---|---|---|
picture_language | ||
.gitignore | ||
ex-1_01-10.scm | ||
ex-1_11-20.scm | ||
ex-1_21-28.scm | ||
ex-1_29-34.scm | ||
ex-1_35-39.scm | ||
ex-1_40-46.scm | ||
ex-2_01-06.scm | ||
ex-2_07-16.scm | ||
ex-2_17-23.scm | ||
ex-2_24-32.scm | ||
ex-2_33-43.scm | ||
ex-2_44-52.scm | ||
ex-2_53-58.scm | ||
ex-2_59-66.scm | ||
ex-2_67-72.scm | ||
ex-2_73-76.scm | ||
ex-2_77-97.scm | ||
LICENSE | ||
README.md | ||
run | ||
util.scm |
SICP
These are my solutions to the CS classic Structure and Interpretation of Computer Programs. I have looked up the answer for some exercises on the Scheme Community Wiki. Such exercise have a marked in their respective script.
You can use the Scheme implementation by the MIT to run these scripts. In Arch,
execute pacman -S mit-scheme
to install it. Then run the scripts via
mit-scheme --quiet < script.scm
.
This is currently (2020/10/12) work in progress.