-(xdef 'table (lambda () (make-hash-table 'equal))) +(xdef 'make-table (lambda () (make-hash-table 'equal))) -(set setter (table)) +(set setter (make-table)) ;; inserted before "def memo" +(def table args + (let h (make-table) + (map (fn ((k v)) (= (h k) v)) + (pair args)) + h)) arc> (table 'a 1 'b 2) #hash((a . 1) (b . 2))
(mac obj args `(table ,@(mappend (fn ((k v)) (list (list 'quote k) v)) (pair args)))) arc> (macex1 '(obj a 1)) (table (quote a) 1) (def listtab (al) (apply table (apply + '() al)))