1 Accumulators
2 Graphs

EECS 111 Project Part 2

Language: Intermediate Student with lambda
Due: 11:59 PM Friday, Mar. 18

1 Accumulators

Write the function

  ; to10: list-of-number -> number

from HTDP/1e exercise 31.3.7 using a helper function that takes an accumulator. The empty list of digits corresponds to the number 0.

You do not need to write the to10-general function mentioned in the exercise.

2 Graphs

Write the following function.

  ; a graph is
  ; (make-graph (listof symbol) (symbol -> (listof symbol)))
  (define-struct graph (nodes neighbor))
  
  ; has-self-loop? : graph -> boolean
  ; Determines whether any node in the given graph is its own neighbor