(define (prog1 X) X) (global 'prog1) (define (die N) (when (args) (write-line 2 (join (map string (args)) " "))) (and N (exit N))) (global 'die) ;; Print binary byte as octal or as ASCII character [32-126] (define (octal-byte x) (if (and (> x 31) (< x 127)) (char x) (format "\\%o" x))) ;; Print string as binary octals (define (octals-string S) (join (map octal-byte (unpack (dup "b" (length S)) S)))) (global 'octals-string 'octal-byte)