Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
9
Task/Compound-data-type/ACL2/compound-data-type.acl2
Normal file
9
Task/Compound-data-type/ACL2/compound-data-type.acl2
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
(defstructure point
|
||||
(x (:assert (rationalp x)))
|
||||
(y (:assert (rationalp y))))
|
||||
|
||||
(assign p1 (make-point :x 1 :y 2))
|
||||
(point-x (@ p1)) ; Access the x value of the point
|
||||
(assign p1 (update-point (@ p1) :x 3)) ; Update the x value
|
||||
(point-x (@ p1))
|
||||
(point-p (@ p1)) ; Recognizer for points
|
||||
Loading…
Add table
Add a link
Reference in a new issue