Changeset 16085 in project


Ignore:
Timestamp:
09/25/09 16:58:44 (10 years ago)
Author:
Kon Lovett
Message:

Exported 'reverse-string-append'. Ports does not use 'reverse-string-append'. Rmvd 'reverse-string-append' from extras since it uses"data-structures".

Location:
chicken/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/NEWS

    r16014 r16085  
    1212  so tz-name constant
    1313- deprecated 'make-pathname' separator argument
     14- exported Unit data-structures 'reverse-string-append'
    1415
    15164.2.0
  • chicken/trunk/data-structures.import.scm

    r15527 r16085  
    7070   queue?
    7171   rassoc
     72   reverse-string-append
    7273   right-section
    7374   shuffle
  • chicken/trunk/data-structures.scm

    r15580 r16085  
    5252      ##sys#flush-output ##sys#write-char-0 ##sys#number->string
    5353      ##sys#fragments->string ##sys#symbol->qualified-string
    54       ##extras#reverse-string-append ##sys#number? ##sys#procedure->string
     54      ##sys#number? ##sys#procedure->string
    5555      ##sys#pointer->string ##sys#user-print-hook ##sys#peek-char-0
    5656      ##sys#read-char-0 ##sys#write-char ##sys#string-append ##sys#gcd ##sys#lcm
     
    6262
    6363(private data-structures
    64   reverse-string-append
    6564  fprintf0 generic-write )
    6665
  • chicken/trunk/extras.scm

    r15559 r16085  
    4949      ##sys#flush-output ##sys#write-char-0 ##sys#number->string
    5050      ##sys#fragments->string ##sys#symbol->qualified-string
    51       reverse-string-append ##sys#number? ##sys#procedure->string
     51      ##sys#number? ##sys#procedure->string
    5252      ##sys#pointer->string ##sys#user-print-hook ##sys#peek-char-0
    5353      ##sys#read-char-0 ##sys#write-char ##sys#string-append ##sys#gcd ##sys#lcm
     
    6060(declare
    6161  (hide
    62     fprintf0 generic-write reverse-string-append) )
     62    fprintf0 generic-write) )
    6363
    6464(include "unsafe-declarations.scm")
     
    578578          (wr obj 0)))) )
    579579
    580 ; (reverse-string-append l) = (apply string-append (reverse l))
    581 
    582 (define (reverse-string-append l)
    583 
    584   (define (rev-string-append l i)
    585     (if (pair? l)
    586       (let* ((str (car l))
    587              (len (string-length str))
    588              (result (rev-string-append (cdr l) (+ i len))))
    589         (let loop ((j 0) (k (- (- (string-length result) i) len)))
    590           (if (< j len)
    591             (begin
    592               (string-set! result k (string-ref str j))
    593               (loop (+ j 1) (+ k 1)))
    594             result)))
    595       (make-string i)))
    596 
    597   (rev-string-append l 0))
    598 
    599580; (pretty-print obj port) pretty prints 'obj' on 'port'.  The current
    600581; output port is used if 'port' is not specified.
  • chicken/trunk/manual/Unit data-structures

    r15896 r16085  
    428428
    429429
     430==== reverse-string-append
     431
     432 [procedure] (reverse-string-append LIST)
     433
     434{{(apply string-append (reverse LIST))}}
     435
    430436
    431437=== Combinators
  • chicken/trunk/ports.scm

    r15583 r16085  
    5858      ##sys#flush-output ##sys#write-char-0 ##sys#number->string
    5959      ##sys#fragments->string ##sys#symbol->qualified-string
    60       ##extras#reverse-string-append ##sys#number? ##sys#procedure->string
     60      ##sys#number? ##sys#procedure->string
    6161      ##sys#pointer->string ##sys#user-print-hook ##sys#peek-char-0
    6262      ##sys#read-char-0 ##sys#write-char ##sys#string-append ##sys#gcd ##sys#lcm
Note: See TracChangeset for help on using the changeset viewer.