1.6 ACL2 Books
1.6.1 "data-structures/list-theory"
| |
|
Examples: |
> (deflist even-listp (l) evenp) |
rename-below: used outside of begin-below in: (rename-below |
(even-listp12 even-listp1)) |
> (even-listp (list 2 4 6)) |
compile: unbound identifier (and no #%top syntax |
transformer is bound) in: even-listp1 |
> (even-listp (list 1 3 5)) |
compile: unbound identifier (and no #%top syntax |
transformer is bound) in: even-listp1 |
> (even-listp 'not-a-list) |
compile: unbound identifier (and no #%top syntax |
transformer is bound) in: even-listp1 |
1.6.2 "data-structures/structures"
| |||||||||||||
|
Examples: | |||
> (defstructure circle radius) | |||
rename-below: used outside of begin-below in: (rename-below | |||
(circle49 circle4)) | |||
> (circle 10) | |||
eval:6:0: circle: undefined in: circle | |||
> (circle-radius (circle 10)) | |||
eval:7:0: circle-radius: undefined in: circle-radius | |||
> (circle-p (circle 10)) | |||
eval:8:0: circle-p: undefined in: circle-p | |||
> (circle-p 'not-a-circle) | |||
eval:9:0: circle-p: undefined in: circle-p | |||
| |||
rename-below: used outside of begin-below in: (rename-below | |||
(rect1218 rect12)) | |||
> (rect 10 20) | |||
eval:11:0: rect: undefined in: rect | |||
> (rect-width (rect 10 20)) | |||
eval:12:0: rect-width: undefined in: rect-width | |||
> (rect-height (rect 10 20)) | |||
eval:13:0: rect-height: undefined in: rect-height | |||
> (rect-p (rect 10 20)) | |||
eval:14:0: rect-p: undefined in: rect-p | |||
> (rect-p (rect -10 -20)) | |||
eval:15:0: rect-p: undefined in: rect-p | |||
> (rect-p 'not-a-rect) | |||
eval:16:0: rect-p: undefined in: rect-p |