You are previewing Land of Lisp.

Land of Lisp

Cover of Land of Lisp by Conrad Barski M.D. Published by No Starch Press
O'Reilly logo

Defining the Edges of Congestion City

The map of Congestion City will be an undirected graph with data associated with each node stored in the variable *congestion-city-nodes*. The possible data at each node will include the presence of the Wumpus, a Glowworm team, and various danger signs.

A set of edges stored in *congestion-city-edges* will connect the nodes, and data linked to these edges will alert us to the presence of any police roadblocks. We declare these and other global variables at the top of our program using defparameter:

 (load "graph-util") (defparameter *congestion-city-nodes* nil) (defparameter *congestion-city-edges* nil) (defparameter ...

The best content for your career. Discover unlimited learning on demand for around $1/day.