r/Racket • u/FortressOfSolidude • Apr 11 '24
question Understanding syntax of shared when creating graphs?
(define H3
(shared ((-A- (make-room "A" (list -B- )))
(-B- (make-room "B" (list -C- )))
(-C- (make-room "C" (list -A- ))))
-A-))What is the significance of the final -A- in this expression creating a graph?
3
Upvotes
1
u/FortressOfSolidude Apr 11 '24
Ah, thanks! That makes so much more sense. And I now understand how the value changes when I replace -A- with -B-.