continue

Simple Shell Scripting: overly concise JScheme version

Here we replaced almost all symbols with one or two character aliases (which could be defined in the library)
;; Perl wanna-be version
(@ f (**/* Dir(// "\\.c$"))
   (<- o((/// "\\.c$" "\\.o")f))
   (? ((||(!(Fis? o))(<=(Fmod o)(Fmod f)))
        (d {compiling [f] to [o]\n})
        (run gcc -c -o  ,o ,f))))
Using
(define-macro (@ f fs . body) `(for-each (lambda(,f) ,@body) ,fs))
(define-macro (? . R) `(cond ,@R))
(define-macro (<- . R) `(define ,@R))
(define-macro (|| . R) `(or ,@R))
(define **/* files**)
(define d display)
(define ! not)
(define Fmod .lastModified)
(define Fis? .exists)
back


back to top


set preferences

LL2, Saturday 9 November 2002, Tim Hickey/Ken Anderson