;;; prelude.scm
;;;
;;; Loaded by DS interpreter during initialization (not loaded by host Scheme).
;;; Deliberately kept small, to avoid enlarging interpreter's store too much.
;;;
;;; Copyright (C) 2002 Anton van Straaten <anton@ppsolutions.com>
;;;
;;; This program is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU General Public License, 
;;; version 2, as published by the Free Software Foundation.
;;;
;;; This program is distributed in the hope that it will be useful, 
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, see http://www.gnu.org/copyleft/gpl.html
;;;
;;; -------------------------------------------------------------------------

Show source file in small font In interpreter-prelude: Link from not to it's cross reference table entry 4.13. Interpreter Prelude
(define (not x) (if x #f #t)) Show source file in small font In interpreter-prelude: Link from null? to it's cross reference table entry 4.13. Interpreter Prelude
(define (null? x) (eqv? x '())) Show source file in small font In interpreter-prelude: Link from negative? to it's cross reference table entry 4.13. Interpreter Prelude
(define (negative? n) (< n 0)) Show source file in small font In interpreter-prelude: Link from positive? to it's cross reference table entry 4.13. Interpreter Prelude
(define (positive? n) (> n 0)) Show source file in small font In interpreter-prelude: Link from zero? to it's cross reference table entry 4.13. Interpreter Prelude
(define (zero? n) (= n 0)) Show source file in small font In interpreter-prelude: Link from caar to it's cross reference table entry 4.13. Interpreter Prelude
(define (caar l) (car (car l))) Show source file in small font In interpreter-prelude: Link from cadr to it's cross reference table entry 4.13. Interpreter Prelude
(define (cadr l) (car (cdr l))) Show source file in small font In interpreter-prelude: Link from cdar to it's cross reference table entry 4.13. Interpreter Prelude
(define (cdar l) (cdr (car l))) Show source file in small font In interpreter-prelude: Link from cddr to it's cross reference table entry 4.13. Interpreter Prelude
(define (cddr l) (cdr (cdr l))) Show source file in small font In interpreter-prelude: Link from call/cc to it's cross reference table entry 4.13. Interpreter Prelude
(define call/cc call-with-current-continuation) ;; silent repl, not currently used ; define quiet-repl ; (lambda (port) ; (main-repl port #f (lambda (x) #f)))) ;; default repl, invoked bootstrap-source in interpreter-repl.scm Show source file in small font In interpreter-prelude: Link from chatty-repl to it's cross reference table entry 4.13. Interpreter Prelude
(define chatty-repl (lambda (port) Show source file in small font In interpreter-prelude: Link from repl-input-prompt to it's cross reference table entry 
(define repl-input-prompt ">> ") Show source file in small font In interpreter-prelude: Link from repl-output-text to it's cross reference table entry 
(define repl-output-text "Value: ") Show source file in small font In interpreter-prelude: Link from display-value to it's cross reference table entry 4.4. Library Procedures
(define display-value (lambda (v) (newline) (display repl-output-text)(write v)(newline))) (main-repl port (lambda () (display repl-input-prompt)) display-value))) ; end of prelude