home *** CD-ROM | disk | FTP | other *** search
/ HAKERIS 11 / HAKERIS 11.ISO / linux / system / LinuxConsole 0.4 / linuxconsole0.4install-en.iso / guile0.4.lcm / share / guile / slib / mularg.scm < prev    next >
Encoding:
Text File  |  2004-01-06  |  323 b   |  13 lines

  1. ;;; "mularg.scm" Redefine - and / to take more than 2 arguments.
  2.  
  3. (define / /)
  4. (define - -)
  5. (let ((maker
  6.        (lambda (op)
  7.      (lambda (d1 . ds)
  8.        (cond ((null? ds) (op d1))
  9.          ((null? (cdr ds)) (op d1 (car ds)))
  10.          (else (for-each (lambda (d) (set! d1 (op d1 d))) ds) d1))))))
  11.   (set! / (maker /))
  12.   (set! - (maker -)))
  13.