;; named prob.scm or so. (library (prob) (export printer this) ;; this line might be modified for testing (import (rnrs)) (define-syntax this (syntax-rules ())) ;; here as well. (define-syntax printer (syntax-rules (this) ;;((_ bit x) (display (list 'this x))) ;; 間違ってた ((_ this x) (display (list 'this x))) ((_ x) (display x)))) (display 'loaded) (newline) )次に、以下のようなスクリプトを用意する。
(import (prefix (rnrs) rnrs.) (prefix (prob) prob:)) (rnrs.define (print . args) (rnrs.for-each rnrs.display args) (rnrs.newline)) ;; should this work? (prob:printer this 123) (prob:printer prob:this 456) (rnrs.define-record-type (pare kons pare?) (rnrs.fields (rnrs.mutable a kar set-kar!) (rnrs.mutable d kdr ser-kdr!))) ;; somehow nmosh doesn't allow me to call this. why? (print (kons 1 2))
指摘が入ってテストスクリプトを修正。上記のコメントは全部無効になりました。つまり、全処理系(除Sagittarius)予定通りに動く。
No comments:
Post a Comment