3 Star 2 Fork 1

hulang/bot-func-lib

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
base.rkt 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
hulang 提交于 2022-08-09 17:50 . add: command类型
(require racket/contract
racket/class
racket/unit
racket/dict
racket/include
racket/pretty
racket/math
racket/match
racket/shared
racket/set
racket/list
racket/vector
racket/string
racket/bytes
racket/function
racket/path
racket/place
racket/future
racket/port
racket/promise
racket/bool
racket/stream
racket/sequence
racket/local
racket/format
racket/date
(for-syntax racket/base)
math/base
(except-in racket/draw make-color make-pen)
2htdp/image
mrlib/gif
(only-in mrlib/image-core render-image))
(define-syntax-rule (define-name-command name body)
(define-syntax name
(lambda (stx)
(syntax-case stx ()
[name (identifier? (syntax name)) (syntax body)]))))
; --- command ---
(struct command (name args) #:transparent)
(define-syntax def/boot
(syntax-rules ()
((_ . def)
(begin
(define . def)
(define expr (cons (quote define) (quote def)))
(define out (open-output-string))
(display expr out)
(command "save-boot-code"
(hash 'code (get-output-string out)))))))
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Racket
1
https://gitee.com/hulang1024/bot-func-lib.git
git@gitee.com:hulang1024/bot-func-lib.git
hulang1024
bot-func-lib
bot-func-lib
master

搜索帮助