2009-04-11 3 views
2

나는 Abuchon/Sussman 강좌와 Berkeley 61A 강의를 사용하여 SICP를 진행 중입니다. 이는 훨씬 더 많은 내 속도입니다. 버클리의 숙제를하고 싶지만 문장은 butfirst, butlast 등으로 정의해야합니다 ( ). 한때 Dr. Scheme에 내장 된 단순한 스키마 언어가있는 것처럼 보였으 나 가장 최근의 버전 4.1.5에는 Scheme이 없습니다. Planet PLT 나는 단순히 내 정의 창에서 (planet "simply-scheme.ss"("dyoo" "simply-scheme"1 0))을 추가 할 수 있다고 생각했습니다. 나는 here 에서 simply.scm 파일을 잡아 시도하고 내 박사 제도 정의 창에 붙여Dr. Scheme의 Simply Scheme 관용구 찾기

require: PLaneT 
could not find the requested package: Server had no matching package: 
No package matched the specified criteria 

얻을 수 있지만 작동하지 않습니다

고급 학생 모드에서

, 내가 읽기를 얻을 수 : "."의 불법 사용

선의

(람다 (문자열 인수) 다음 코드

(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에서

I 얻을 세트 !:에서 모듈 요구 식별자를 돌연변이 없습니다.. 번호 -> 문자열 (행 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) 

답변

4

당신이 그것을 위해 설계되었습니다 예를 다음과 같은 경우가 아니라면 고급 학생은 정말 당신을 위해 작동하지 않습니다. 대부분의 책과 예제가 같은 R5RS 또는 무언가를 가정합니다. 나는 사전을 사용하는 것이 좋습니다 tty Big 언어에는 R RS뿐만 아니라 PLT require 구문과 몇 가지 다른 것들이 모두 포함되어 있습니다.

행성에서 간단하게 계획 패키지를 사용하려면 새 구문을 필요로 사용해야합니다 (당신은 package listing page에이를 찾을 수 있습니다, 그것은 업데이트되지 않은 docs for the package 모양) :

(require (planet dyoo/simply-scheme:1:2/simply-scheme)) 
+0

감사합니다. Brian. 너는 그 사람이야! – Leonard