/usr/share/scheme48-1.9/misc/sicp.scm is in scheme48 1.9-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | ; Part of Scheme 48 1.9. See file COPYING for notices and license.
; Authors: Richard Kelsey, Jonathan Rees
; Compatibility mode for use with Abelson & Sussman's book,
; Structure and Interpretation of Computer Programs.
; Requires ERROR, MAKE-TABLE, TABLE-REF, and TABLE-SET!.
; Streams
(define-syntax cons-stream
(syntax-rules ()
((cons-stream head tail)
(cons head (delay tail)))))
(define stream-car car)
(define (stream-cdr s) (force (cdr s)))
(define the-empty-stream '(list <the-empty-stream>))
(define (stream-null? s) (eq? s the-empty-stream))
; GET and PUT
(define (make-property-module)
(define symbol-properties-table #f)
(define (put symbol indicator value)
(let* ((probe (table-ref symbol-properties-table symbol))
(table (if probe
probe
(let ((table (make-table)))
(table-set! symbol-properties-table symbol table)
table))))
(table-set! table indicator value)))
(define (get symbol indicator)
(let ((probe (table-ref symbol-properties-table symbol)))
(if probe
(table-ref probe indicator)
#f)))
(set! symbol-properties-table (make-table))
(cons get put))
(define property-module (make-property-module))
(define get (car property-module))
(define put (cdr property-module))
|