A:
1. `(,@'(1 2))
,@ will expand the list follows it. '(1 2) is is evaluated to a list. so ,@ will expand it to 1 2 which will be inserted into the outer ( 1 2 ).
2. `(,@(1 2))
,@ will expand the list follows it. It meets (1 2) - a malformed function call which will yield an error.
Why there's an extra ' in ',',place?
A:
1. ',',place
it's because we want that extra ' to expand:
(game-action (weld chain bucket attic ...))
(weld 'chain 'bucket 'attic ...)
instead of
(weld chain bucket attic ...)
You can safely ignore that '.
2. ,@',rest
the rest is the extra conditions we'd like to add to the existing ones. A simple one is (cond t '(1)), and it will be expanded into:
No comments:
Post a Comment