;; it would be nice to have a language where all the operations are on ;; streams, and constants are by default streams. the repl then would ;; just gnuplot some determined number of values from the stream. ;; on the other hand, a simple functin of t would do.. (module filterproto mzscheme (require "stream.ss" "gnuplot.ss" (lib "match.ss") (lib "process.ss")) ;; integer arithmetic filter prototyping. (define @n (@sequence 0 1)) (define pi (* 4 (atan 1))) (define (partial cos n N) (lambda (k) (cos (/ (* 2 k n pi) N)))) ;; single gnuplot instance (define *gnuplot* (open-gnuplot)) (define (@plot n stream) (plot-list (@take n stream) *gnuplot*)) )