Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
8
Task/Enumerations/Common-Lisp/enumerations-1.lisp
Normal file
8
Task/Enumerations/Common-Lisp/enumerations-1.lisp
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
;; symbol to number
|
||||
(defconstant +apple+ 0)
|
||||
(defconstant +banana+ 1)
|
||||
(defconstant +cherry+ 2)
|
||||
|
||||
;; number to symbol
|
||||
(defun index-fruit (i)
|
||||
(aref #(+apple+ +banana+ +cherry+) i))
|
||||
2
Task/Enumerations/Common-Lisp/enumerations-2.lisp
Normal file
2
Task/Enumerations/Common-Lisp/enumerations-2.lisp
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(deftype fruit ()
|
||||
'(member +apple+ +banana+ +cherry+))
|
||||
Loading…
Add table
Add a link
Reference in a new issue