Changeset 14903 in project


Ignore:
Timestamp:
06/06/09 12:45:49 (10 years ago)
Author:
azul
Message:

Fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/3/stream-base64/stream-base64.scm

    r14902 r14903  
    2121
    2222(declare (export base64-decode base64-encode))
    23 (require-extension srfi-40 stream-ext embedded-test)
     23(use srfi-40 stream-ext embedded-test)
    2424
    2525(define *alphabet* "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")
     
    6464            (loop (stream-drop-safe input len))))))))
    6565
    66 (define base64-encode
     66(define (base64-encode str)
    6767  (break-lines
    68     (transform 3 identity 8 num->dig #t 6 (lambda (r) (make-stream (- 3 r) #\=)))
     68    ((transform 3 identity 8 num->dig #t 6 (lambda (r) (make-stream (- 3 r) #\=))) str)
    6969    76))
    7070
     
    8585        (stream-cons (getval (arithmetic-shift num (- bits-char left)))
    8686          (loop (- left bits-char)))))))
    87 
Note: See TracChangeset for help on using the changeset viewer.