Files
jak-project/goal_src/kernel/gcommon.gc
T
2020-09-13 10:44:12 -04:00

25 lines
796 B
Common Lisp

;-*-Lisp-*-
(in-package goal)
;; name: gcommon.gc
;; name in dgo: gcommon
;; dgos: KERNEL
;; gcommon is the first file compiled and loaded.
;; it's expected that this function will mostly be hand-decompiled
;; The "identity" returns its input unchanged. It uses the special GOAL "object"
;; type, which can basically be anything, so this will work on integers, floats,
;; strings, structures, arrays, etc. The only things which doesn't work with "object"
;; is a 128-bit integer. The upper 64-bits of the integer will usually be lost.
(defun identity ((x object))
;; there is an optional "docstring" that can go at the beginning of a function
"Function which returns its input. The first function of the game!"
;; the last thing in the function body is the return value.
x
)