Page 1 of 1

Editing the lists in the hash-maps

Posted: Thu Apr 07, 2022 7:35 pm
by cameyo
Example:

Code: Select all

(new Tree 'hh)
(for (i 1 5)
  (setq key (string i))
  (for (k i 1 -1)
    (hh key (if DOLLAR-it (extend (list k) DOLLAR-it)  (list k)))
  )
)
(hh)

Code: Select all

output: (("1" (1)) ("2" (1 2)) ("3" (1 2 3)) ("4" (1 2 3 4)) ("5" (1 2 3 4 5)))
Note: DOLLAR-it is $it