learning-sicp

My embarrassing half assed SICP run.
Log | Files | Refs

print-deque.scm (359B)


      1 (define-library (sicp solutions 3_23 print-deque)
      2   (import (scheme base))
      3   (import (scheme write))
      4 
      5   (import (sicp solutions 3_23 deque-to-list))
      6 
      7   (export print-deque)
      8 
      9   (begin
     10     (define (print-deque deque . port)
     11       (if (null? port)
     12           (display (deque->list deque))
     13           (display (deque->list deque)
     14                    (car port))))))