Re: flet vars



On 14 abr, 22:51, TheFlyingDutchman <zzbba...@xxxxxxx> wrote:
Is it possible to change the values of the variables in an flet?

(flet (   (function1 () (format t "hi from function1~%")))
   (function1)
   ; change what function1 refers to
   (function1))

Use defun from inside the flet.
.



Relevant Pages

  • Re: flet vars
    ... Use defun from inside the flet. ... Defun always changes the global binding. ...
    (comp.lang.lisp)
  • Re: Not understanding how to write low-level code in Lisp
    ... and requires a garbage collector to run whether or not ... your code dynamically allocates memory. ... (defun gc-mark (address) ...   "Marks the object at address and all the objects it deeply references.." ...
    (comp.lang.lisp)
  • Re: Its A Big Language Survey
    ... will expell him from the group of compund loop ... Recursion and functional style usually results in a cleaner code, ... (defun collect (item/s) ...   (etypecase x ...
    (comp.lang.lisp)
  • Re: Alternatives 3
    ...   nil ... This looks nicer: ... (defun filter (fn list) ... (loop for x in list when (funcall fn x) ...
    (comp.lang.lisp)
  • Re: ECL technical question
    ... I don't know of any way to remove the debugger from the ECL image. ... (defun alternative-debugger-hook (condition hook) ...   ) ...
    (comp.lang.lisp)