-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TAKE 2: code refactored for beginners, with extensive comments and docstrings #5
base: master
Are you sure you want to change the base?
Conversation
also added comments to help orient new users
shapes: box, x, diamond, george segment-lists allow compound shapes to be drawn using concat; see diamond-x fcns: flip-horiz, flip-vert; rotate, rotate180, rotate270; below
Abstracted split-up, split-right into higher-level split function.
Source code refactored, with comments and docstrings added, to make it easy for beginners to get up to speed quickly. Does not implement image-painter. To give yourself a chance to complete the exercise as ‘thattommyhall’ intended, delete the bodies of the following functions: add-vec sub-vec scale-vec flip-horiz rotate below path right-split (uncomment by removing “#_”) up-split (uncomment by removing “#_”) split Just evaluate this file to see the “goal” function, square-limit, draw itself. This version uses the “higher-level” versions of right-split and up-split. If you decide to write the code for up-split and derive the higher-level function ‘split’, you will need to comment out or remove the versions of right-split and up-split that follow split in the source code and un-comment the versions that precede split in the source code. Enjoy, and please give me feedback if you find my version helpful!
This reverts commit f8dc53523901f84b162294b3ba8f2bd7a6a3ac6f. Conflicts: src/escher/core.clj
This reverts commit f8dc53523901f84b162294b3ba8f2bd7a6a3ac6f. Conflicts: src/escher/core.clj
This file is functionally equivalent to the version in the SICPDistilled/master repository. The following has been done to make the file more useful to Clojure programmers who are starting from scratch: * reordered code to group related code together * added useful info in comments * added docstrings to major functions * added formatting to increase readability
see below On Mar 25, 2015, at 7:18 AM, thattommyhall [email protected] wrote:
Gregg |
Now I've cut out everything that you didn't have in your version of escher.clj. I also added support for clj-tuple. Feel free to use as much/as little as you wish.
Cheers,
Gregg