Lambda Forever!

Homework Submission Requirements

CS 3540
Programming Languages and Paradigms


This document outlines the rules you should follow when submitting a homework assignment for grading. These rules will simplify the grader's job by standardizing the form and appearance of submissions. Any of these rules can be overridden by a particular assignment but, if the assignment doesn't say otherwise, follow each of them.

Forms of Submission

When you are asked to submit a set of files, you will be required to submit them in one or two forms: electronically and (rarely) hard copy.


Source Code


I do not require you to follow a lot of specific style rules, but I do ask you to follow several basic guidelines to improve the readability of your code.

  1. Indent your code in the standard Racket way.

    Racket's style indicates that one expression is subordinate to another. This is essential when programming in Racket. For example, write this:
         (define factorial
           (lambda (n)
             (letrec ((accumulate
                         (lambda (n answer)
                           (if (zero? n)
                               (accumulate (- n 1) (* n answer))))))
               (accumulate n 1))))
    not this:
         (define factorial (lambda (n)
          (letrec ((accumulate
              (lambda (n answer)
                           (if (zero? n)
                      (accumulate (- n 1)
                            (* n answer))))))
                         (accumulate n 1))))
    You will see proper style in all the code I give and in all the code you see in our course reading. Learn from these examples.

    When you use Dr. Racket, it will indent your code in the standard way. If your indentation ever gets out of whack, you can use the "Reindent" or "Reindent All" options on the Racket menu to re-indent your code.

  2. Use names that say what they name.

    For example, num-scores is a better name than n, and number-of-scores is better yet.

    Racket lets you use names that say just about anything you need to say. Take advantage of that! If you have a list of the numbers from 4 to 10, name it 4-to-10  . If a procedure converts characters to pairs, name it char->pair  .

  3. Use hyphens to create compound names.

    Racket symbols are case-sensitive, but it comes from a culture in which names are case-insensitive. Do not use CamelCase for your procedure and parameter names. Instead of numberofscores, as you might in Java or Python, use number-of-scores instead.

Eugene Wallingford .....