(no subject)

Graph Theory Project (link@cs.uno.edu)
Fri, 21 Nov 1997 13:29:29 -0600 (CST)


Hi:
I tried the example "Link: Exploring Combinatorial Objects

I typed the following language and has the error:
STk> (define verts (set-vertex))
#[undefined]
STk> (define bev-test (string->regexp "Beverage"))
#[undefined]
STk> (define snack-test (string->regexp "Snack"))
#[undefined]
STk> (define (has-snack vlist)
(cond ((null ? vlist) #f)
(#t (or (snack-test (vertex-label (car vlist)))
(has-snack (cdr vlist))))))
#[undefined]
STk> (define (has-bev vlist)
(cond ((null ? vlist) #f )
(#t (or (bev-test (vertex-label (car vlist)))
(has-bev (cdr vlist))))))
#[undefined]
STk> (map (lambda (e)
(if (and (has-bev (set-vertex->list (vertices e)))
(has-snack (set-vertex->list (vertices e))))
(set! verts (+ verts (vertices e)))))
(set-edge->list (edges h)))

*** Error:
unbound variable: h
STk> (define has-snack-or-bev (induced-subgraph h verts 1))

*** Error:
unbound variable: h
STk> (define hsv (make <graph-view>:graph has-snack-or-bev
:layout 'spring))

*** Error:
unbound variable: <graph-view>:graph

can you tell me why?

have a good weekend!

Mei Liu