mirror of
https://github.com/open-goal/jak-project
synced 2026-07-01 20:20:35 -04:00
4bea175140
* fix decompiler for task control * support in compiler * changelog * typo
23 lines
512 B
Common Lisp
23 lines
512 B
Common Lisp
(deftype type-with-func (basic)
|
|
((add-func (function int int int))
|
|
(sub-func (function int int int))
|
|
)
|
|
)
|
|
|
|
(define *type-with-func*
|
|
(new 'static 'type-with-func
|
|
:add-func (lambda ((x int) (y int))
|
|
(+ x y))
|
|
:sub-func (lambda ((x int) (y int))
|
|
(- x y))
|
|
)
|
|
)
|
|
|
|
|
|
(defun this-is-a-function ()
|
|
"blah blah")
|
|
|
|
(format #t "Add: ~d sub: ~d~%"
|
|
((-> *type-with-func* add-func) 10 20)
|
|
((-> *type-with-func* sub-func) 10 20))
|