(cons item list)
Add this item to the beginning of the list.
This function constructs a new list using separate elements. This function also enables you to create a dotted pair, used by progeCAD to access entity data. A dotted-pair is created only when the function is used to join two individual items together in the form (cons item item).
The first argument, item, is the item which will be added to the beginning of the list. The item may be a list itself, but will still be treated in the list as a single item.
Examples
Code | Returns |
---|---|
(cons 'a '(b c d)) | (A B C D) |
(cons 'a 'b) | (A . B) (Dotted pair) |
(cons '(a b) '(c d)) | ((A B) C D) |