| While reading through arc.arc I noticed a pattern that appears in a few places, mapping an anonymous function to a list of pairs: (map (fn ((p v)) (expand= p v))
(pair terms)))
A convenient shortcut would be: (mappair p v (expand= p v) terms)
Which could be written: (mac mappair (x y expr args)
`(map (fn ((,x ,y)) ,expr)
(pair ,args)))
This idiom is used in expand=list, obj, copy, deftem, and addtem. |