48hScheme
Solutions and notes for Write Yourself a Scheme in 48 Hours.
Env
I used the Haskell Platform. This allows you to install Parsec with cabal like so:
cabal update
cabal install Parsec
Running Code
I used runHaskell x.hs
to run my haskell code rather than compiling each time. I used ghci
to test out various functions by importing them with :import x.hs
. You might also find it useful to know that --
starts a comment that runs to the end of the line. Note though the Haskell wiki calls out comments as bad.
Organisation
This repository is layed out in the following manner:
- Each page coresponds to a directory e.g. The First Steps book page corresponds to the FirstPage directory in this repository. Note that directory names have no spaces.
- Each directory contains the code provided on that page verbatim in a file of the same name e.g. the code from First Steps is given verbatim in FirstSteps.hs.
- Each excersise solution is contained within the
page-exercise_number.hs
file e.g. Ex 1 of First Steps is contained in FirstSteps-1.hs. - Each directory also contains a
NOTES.md
file which contains any notes I made whilst reading/completing the page exercises.
Contribute
If you think the code here is bad, open an issue with your solution and a thorough explanation of why your code is better.
Licence
Refer to the LICENSE file.