题
我正在使用Ableson/Sussman的演讲和伯克利61A讲座,这是我的速度要高得多的。我想做一些伯克利的作业,但需要句子的定义,butfirst,butlast等。看起来曾经有一种简单的方案语言内置于博士中。方案,但最新版本 4.1.5 没有它。从 PLT星球我以为我可以在我的定义窗口中简单地添加(“ simply-scheme.ss”(“ simply-scheme.ss”(“ dyoo”“ simply-scheme” 1 0)))。我明白了
require: PLaneT
could not find the requested package: Server had no matching package:
No package matched the specified criteria
我尝试从以下位置获取 simple.scm 文件 这里并将其粘贴到我的 Dr Scheme 定义窗口中,但它不起作用:
在高级学生模式下,我被阅读:非法使用“.”
对于行 (lambda (string .args) 在以下代码中。
(define whoops
(let ((string? string?)
(string-append string-append)
(error error)
(cons cons)
(map map)
(apply apply))
(define (error-printform x)
(if (string? x)
(string-append "\"" x "\"")
x))
(lambda (string . args)
(apply error (cons string (map error-printform args))))))
在R5RS中,我得到了!:不能改变模块所需的标识符:数字 - >字符串(以下代码的第7行)
(if (char=? #\+ (string-ref (number->string 1.0) 0))
(let ((old-ns number->string)
(char=? char=?)
(string-ref string-ref)
(substring substring)
(string-length string-length))
(set! number->string
(lambda args
(let ((result (apply old-ns args)))
(if (char=? #\+ (string-ref result 0))
(substring result 1 (string-length result))
result)))))
'no-problem)
不隶属于 StackOverflow