[CM] determining existence of function
Terrence Brannon
metaperl@urth.org
Sat, 02 Oct 2004 04:33:02 -0400
I defined the function row->matrix via C-x C-e and then went to the Listener and
attempted to verify that I did by typing row->matrix into the Listener window.
With most Schemes I have used, I get something like:
#<function row->matrix>
But with guile-scheme I got this:
CM[1]>
CM[2]>
CM[3]> row->matrix
*** - EVAL: variable ROW->MATRIX has no value
The following restarts are available:
STORE-VALUE :R1 You may input a new value for ROW->MATRIX.
USE-VALUE :R2 You may input a value to be used instead of ROW->MATRIX.
*** - UNIX error 13 (EACCES): Permission denied
The following restarts are available:
STORE-VALUE :R1 You may input a new value for ROW->MATRIX.
USE-VALUE :R2 You may input a value to be used instead of ROW->MATRIX.
Break 1 CM[4]> (pprint (row->matrix albans-row))
((0 3 7 11 2 5 9 1 4 6 8 10) (9 0 4 8 11 2 6 10 1 3 5 7)
(5 8 0 4 7 10 2 6 9 11 1 3) (1 4 8 0 3 6 10 2 5 7 9 11)
(10 1 5 9 0 3 7 11 2 4 6 8) (7 10 2 6 9 0 4 8 11 1 3 5)
(3 6 10 2 5 8 0 4 7 9 11 1) (11 2 6 10 1 4 8 0 3 5 7 9)
(8 11 3 7 10 1 5 9 0 2 4 6) (6 9 1 5 8 11 3 7 10 0 2 4)
(4 7 11 3 6 9 1 5 8 10 0 2) (2 5 9 1 4 7 11 3 6 8 10 0))
Break 1 CM[4]>
====
the fact that I can run the function implies that the C-x C-e on the function
definition did in fact define it. However, I do not understand why I could test
for the existence of the function by typing it into the REPL.