(define (double x) (+ x x))
→ (lambda (x) (+ x x))
(first double) → (x)
(last double) → (+ x x)
;; make a ''fuzzy'' double
(setf (double 1) '(mul (normal x (div x 10)) 2))
(double 10) → 20.31445313
(double 10) → 19.60351563
This example is in code patterns. Section "Functions as Data". This didn't work for me. But this one works:
(setf (nth 1 double) '(mul (normal x (div x 10)) 2))
If we use implicit indexing on functions, how can the interpreter know that we need indexing or running the function? (I am just guessing. I am not only new to newLISP, also new to programming)