1 (defun node-fun (node get-code get-links
)
2 (let ((code (funcall get-code node
))
3 (links (funcall get-links node
)))
12 ; Produce a list of commands to produce temporary bindings.
20 ;Produce a list of commands to reset function values.
24 ',(symbol-function (car x
)))
25 `(fmakunbound ',(car x
))))
28 ;; Recursively replace the chunks to recover executable code.
30 (defun tangle-module (node get-cont ins-links
)
32 (funcall get-cont node
)
35 (tangle-module (cdr x
)
38 (funcall ins-links node
))))
40 ;; Given a node and an association list of replacement texts, insert
41 ;; the chunks at the appropriate places.
43 (defun insert-chunk (body chunks
)
44 (cond ((null body
) nil
)
46 ((equal (car body
) '*insert
*)
47 (cdr (assoc (cadr body
) chunks
)))
48 (t (cons (insert-chunk (car body
) chunks
)
49 (insert-chunk (cdr body
) chunks
)))))