Author Topic: How to transform the defun into static-defun of result?  (Read 885 times)

0 Members and 1 Guest are viewing this topic.

d2010

  • Bull Frog
  • Posts: 326
How to transform the defun into static-defun of result?
« on: April 23, 2021, 04:06:24 PM »
a)The problem is;  how to hide the result inside body of Defun?
E.g If I call this function
     (set ax (mid_pnt (list 2.0 2.0 0.0) (list 4.0 4.0 0.0)))
    then I call (Inject-insideDefun ax "mid_pnt")
 :glarestraight:
Code: [Select]
(defun mid_pnt (p1 p2 / A B $rr)
(setq $rr nil)
(setq A P2)
(setq B P1)
(setq % (mapcar '(lambda (I J) (/ (+ I J) 2))
      A B)
 )
The instr. (Inject-insideDefun replace nil with (list 3.0 3.0 0.0)
Do you understand what is static=function, from linkedin.com?=clickhere with mouse.com
 :gum:
b)Secondary problem, How to read (list 3.0 3.0 0.0) from body-defun
Code: [Select]
(defun extractor_last (defunname As String  / $rr)
???
$rr)
;; You call (extractor_last "mid_pnt"), Must return (list 3.0 3.0 0.0)
« Last Edit: April 23, 2021, 05:00:00 PM by d2010 »