Is there a way in Scheme for a function to detect whether it is being run by an (eval x) form? Or use a macro to do something like change all the ‘Ds to ’Cs in the parent function?
If so, then an amusing case would be a PoltergeistBot, which only ever Defects, but if another bot tries to evaluate it, it “possesses” the function and forces it to Cooperate.
Or somewhat more realistically:
Is there a way in Scheme for a function to detect whether it is being run by an (eval x) form? Or use a macro to do something like change all the ‘Ds to ’Cs in the parent function?
If so, then an amusing case would be a PoltergeistBot, which only ever Defects, but if another bot tries to evaluate it, it “possesses” the function and forces it to Cooperate.