2015-11-18 06:14:39 +00:00
|
|
|
(macro-time
|
|
|
|
|
(defun question-var-to-meta-num (var)
|
|
|
|
|
^(sys:var ,(int-str (cdr (symbol-name var))))))
|
2014-04-02 16:56:35 +00:00
|
|
|
|
2015-11-18 06:14:39 +00:00
|
|
|
(defmacro map (square-fun . square-args)
|
|
|
|
|
(tree-bind [(fun . args)] square-fun
|
|
|
|
|
^[apply mapcar (op ,fun ,*[mapcar question-var-to-meta-num args])
|
|
|
|
|
(macrolet ([(. args) ^(quote ,args)])
|
|
|
|
|
(list ,*square-args))]))
|
2014-04-02 16:56:35 +00:00
|
|
|
|
2015-11-18 06:14:39 +00:00
|
|
|
(defun word (. items)
|
|
|
|
|
[apply format nil "~a~a~a" items])
|
2014-04-02 16:56:35 +00:00
|
|
|
|
2015-11-18 06:14:39 +00:00
|
|
|
(defun show (x) (pprinl x))
|
2014-04-02 16:56:35 +00:00
|
|
|
|
2015-11-18 06:14:39 +00:00
|
|
|
(show (map [(word ?1 ?2 ?3)] [a b c] [A B C] [1 2 3]))
|