summaryrefslogtreecommitdiff
path: root/struct.lisp
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-02-13 17:32:00 -0500
committerLLLL Colonq <llll@colonq>2026-02-13 17:32:00 -0500
commit2b47c650a161fe2c2c4c7f4d74a19c2c6fe6021e (patch)
tree357e6484f707faaafae41aa4a35bbb418c791bf1 /struct.lisp
parente6329f2ce1df83fd729e79f7e92e55fe96a2e826 (diff)
Update
Diffstat (limited to 'struct.lisp')
-rw-r--r--struct.lisp11
1 files changed, 11 insertions, 0 deletions
diff --git a/struct.lisp b/struct.lisp
new file mode 100644
index 0000000..9e35654
--- /dev/null
+++ b/struct.lisp
@@ -0,0 +1,11 @@
+(defstruct! foo
+ x
+ y
+ z)
+
+(setq! x (foo/new :y 10 :x 5 :z 111))
+(print! x)
+(print! (foo/get-y x))
+(foo/set-y! x 42)
+(print! (foo/get-y x))
+(print! (foo/get-z x))