Style guidelines for cs1321x ---------------------------- o Unless otherwise noted, all assignments should be written in R5RS scheme. o When saving, save files as plain text. Do not use comment boxes or insert pictures or any of the other options under "special". This will cause your file to be saved in an unreadble, non-plaintext format. o Wrap lines at no more than 80 (eighty) characters. You can tell how far along you are so far by looking at the little box at the bottom of the DrScheme editor window. The number on the left of the colon is the line that you're on, and the number on the right of the colon is the horizontal position on the line. Don't let the number on the right (the horizontal position) go over 80. o Let DrScheme indent the file. Make it look pretty to read. o When writing functions, make sure that you name your function exactly as specified in the homework, and that your function has its parameters in the correct order. o Use the standard scheme convention for comments--two semicolons to begin a whole-line comment and a single semicolon for inline comments. o For each function that you write, you should have a header that gives the contract and purpose. For example: ;; contract factorial: non-negative-number -> number ;; purpose given a non-negative number, return the factorial of that ;; number (define (factorial num) ( ... o Give your functions descriptive names. If your function only returns #t or #f, end the name with a question mark. Remember that longer is not always better--conciseness counts! o When naming parameters you should use concise names. Make them short enough to be usable but long enough to be meaningful. Avoid single-character variable names. o When writing a helper function, give the function a meaningful name. If it sums a list then 'sum-list' is a good name. 'add-em-up' is not quite as good. 'do-it' is unacceptable. 'bob' will get you negative points. If the helper is just for tail recursion, then just add '-tail' to the end of the function name (ie, factorial and factorial-tail)