2017-03-09 14:14:54 -05:00
|
|
|
(load "../lang/dlambda.lisp")
|
|
|
|
(load "../lang/functions.lisp")
|
|
|
|
|
2017-03-10 15:08:42 -05:00
|
|
|
(defmacro keys (&rest fields)
|
2017-03-13 14:43:31 -04:00
|
|
|
`(let ,(mapcar 'list fields)
|
|
|
|
(dlambda
|
2017-03-10 15:08:42 -05:00
|
|
|
(:get (field) (eval field))
|
|
|
|
(:set (field value) (set field value)))))
|
2017-03-09 14:14:54 -05:00
|
|
|
|
|
|
|
(defun process-data (data)
|
|
|
|
(let ((one (call data :get 'one))
|
|
|
|
(two (call data :get 'two))
|
|
|
|
(three (call data :get 'three)))
|
|
|
|
(list one two three)))
|
|
|
|
|
|
|
|
(setq data (keys one two three))
|
|
|
|
(call data :set 'one "goodbye")
|
|
|
|
(call data :set 'two "key")
|
|
|
|
(call data :set 'three "!")
|
|
|
|
(process-data data)
|