# [racket] Graphing Help

 From: Andrew Regnery (atregnery at gmail.com) Date: Thu Mar 21 15:51:08 EDT 2013 Previous message: [racket] What is a "zed document" (was: programming quote) Next message: [racket] Graphing Help Messages sorted by: [date] [thread] [subject] [author]

```Hi All,

I am currently struggling with this function below. Can anyone help me out?

Write the following two functions.

; a graph is  ; (make-graph (listof symbol) (symbol -> (listof symbol)))
(define-struct<http://docs.plt-scheme.org/htdp-langs/intermediate-lambda-unchanged.html#(form._((lib._lang%2Fhtdp-intermediate-lambda..rkt)._define-struct))>
graph (nodes neighbor))    ; has-self-loop? : graph -> boolean  ; Determines
whether any node in the given graph is its own neighbor    ; has-cycle? :
graph -> boolean  ; Determines whether the given graph has a cycle.
A *cycle* is a path from a node to itself, and a *self-loop* is a special
case of a cycle that consists of only a single edge.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130321/1d43c9d6/attachment-0001.html>
```

 Posted on the users mailing list. Previous message: [racket] What is a "zed document" (was: programming quote) Next message: [racket] Graphing Help Messages sorted by: [date] [thread] [subject] [author]