将符号的值设置为由列表定义的函数 支持的平台:视窗和 Mac OS 签名(defun-q-list-set 'sym list)
返回值类型:列表、符号或无 符号定义。 例子(defun-q-list-set 'foo '((x) x)) FOO (foo 3) 3 以下示例说明了如何使用 将两个函数组合成一个函数:defun-q-list-setdefun-q (defun-q s::startup (x) (print x)) S::STARTUP (defun-q my-startup (x) (print (list x))) MY-STARTUP 用于将函数组合成单个函数:defun-q-list-set (defun-q-list-set 's::startup (append (defun-q-list-ref 's::startup) (cdr (defun-q-list-ref 'my-startup)))) S::STARTUP 下面说明了函数如何单独响应,以及函数组合后的工作方式:defun-q-list-set (defun-q foo (x) (print (list 'foo x))) FOO (foo 1) (FOO 1) (FOO 1) (defun-q bar (x) (print (list 'bar x))) BAR (bar 2) (BAR 2) (BAR 2) (defun-q-list-set 'foo (append (defun-q-list-ref 'foo) (cdr (defun-q-list-ref 'bar)) )) FOO (foo 3) (FOO 3) (BAR 3) (BAR 3) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2024-12-15 14:58
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.