Dear GAP Forum,
Markus Pueschel asked:
email@example.com said: > I have the following problem: > gap> f := i -> (j -> j + i); function ( i ) ... end gap> Print(f(4)); > function ( j ) > return j + i;
I didn't really expect that gap would print
function ( j )
return j + 4;
but still would like to find a way to do it.
(i.e., how do I access the "context" of f(4)?)
I am afraid this information is not accessible from the GAP level.
If you are interested, I can explain to you off-line
how this link is maintained in the kernel, and how you might set about writing
kernel functions to access it if you really wanted to, but it is, to put it
mildly, rather technical.
-- Steve Linton School of Computer Science & Centre for Interdisciplinary Research in Computational Algebra University of St Andrews Tel +44 (1334) 463269 http://www-theory.dcs.st-and.ac.uk/~sal Fax +44 (1334) 463278