Skip to content

Commit 45c53df

Browse files
author
Paul Nathan
committed
Added defclass snippet.
Added snippet for DEFCLASS- from my iPhone. Todo: test this.
1 parent 89b6887 commit 45c53df

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

examples~snippets.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@ written.
2525
)
2626
~~~~
2727

28+
### Defining a class
29+
30+
~~~~Commonlisp
31+
(defclass my-class (list-of-superclasses)
32+
((variable
33+
:accessor accessor-function
34+
:initarg key-to-pass-in
35+
:initform form-initialization)
36+
Another-variable))
37+
(:documentation "a class snippet!"))
38+
~~~~
39+
2840

2941
### Defining a constant:
3042

0 commit comments

Comments
 (0)