> < ^ Date: Tue, 11 Jun 2002 10:28:46 -0400
> < ^ From: Markus Pueschel <pueschel@earthlink.net >
> ^ Subject: functions that return functions

Dear Gap Forum,

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)?)

thanks, Markus

--
Markus Pueschel
Research Faculty
Dept. of Electrical and Computer Engineering
Carnegie Mellon University
http://www.ece.cmu.edu/~pueschel


> < [top]