[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Piping Scheme scripts



Quoting "Matt 'LEGO Guy' Jadud":
> 
> Hello,
> 
> 	This should be simple, but I'm having a hard time getting a Scheme
> program to behave such that a call like
> 
> 	> mzscheme -f script.scm | echo
> 
> will actually pass something through the pipe to `echo'. 

But `echo' doesn't take anything on it's stdin! It takes it's argument
and passes it to stdout. This works:

  mzscheme -mvqe '(let loop ([n 10]) (unless (zero? n) (display n) (newline) (loop (- n 1))))' | less


Hope that helps,
Robby