Editing the lists in the hash-maps

Q&A's, tips, howto's
Post Reply
cameyo
Posts: 176
Joined: Sun Mar 27, 2011 3:07 pm
Location: Italy
Contact:

Editing the lists in the hash-maps

Post 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

Post Reply