Start of topic | Skip to actions

Assignment 12 (Due Friday 12/7/2007 at 5:00 PM)

Weight: 50 points.

Submit via SVN.

(These may change.)

Required problems (Must be submitted for grading):

Suppose we have a cyclic list of numbers defined like this:

(define ONES (cons 1 empty))
(set-rest! ONES ONES)

Write the following functions on cyclic lists:

  1. insert!
        ; insert! : [X] X -> (void)
        ; Inserts the given X at the end of the cyclic list. That is, the
        ; element is inserted before the list starts repeating.
    
  2. cyclic-list-length
        ; cyclic-list-length : [X] -> natural
        ; Returns the number of items in a cyclic list before it cycles.
    

Access Permissions: (Please don't edit)


End of topic
Skip to actions | Back to top
Creative Commons LicenseThis work is licensed under a Creative Commons Attribution 2.5 License. Please follow our citation guidelines.