This is quite what I wanted to do, only, I didn't think about letting the
user decide wether a result should be kept or not. Hence, how do I write a
function as the adjacency_matrixK(g) below, that keeps the information in
g (!!!) also? That is,
M : adjacency_matrix(g);
N : adjacency_matrix(g);
should compute the matrix exactly once. Well, this is a silly example, the
point is: How can I write a (Lisp) function that remembers its result
properly? Have a function "Create_Graph" that sets up a unique new symbol
and store everything under this label? When I think about it, this sounds
right, does it?
Martin
> b) Create functions which tell the program whether to keep the info into
> the graph or not:
>
> M : adjacency_matrix(g);
> M : adjacency_matrixK(g);
>
> The first could simply return the adj. matrix, while the second could
> store it in your "graph" structure or in a hash table, or any way you
> want.