scsh-users
[Top] [All Lists]

Functional PostScript alist->int-map correction

To: scsh-news@zurich.ai.mit.edu
Subject: Functional PostScript alist->int-map correction
From: stktrc <stktrc@yahoo.com>
Date: Sun, 02 Mar 2003 00:37:08 +0100
Organization: News UmU SE
Arguments to vector constructor seem to have been swapped.

*** fps.map.scm.orig    Sat Mar  1 20:14:14 2003
--- fps.map.scm Sun Mar  2 00:19:42 2003
***************
*** 164,170 ****
  
  (define (alist->int-map alist map-size . user-default)
    (let* ((default-val (:optional user-default #f))
!        (new-vect    (make-vector default-val map-size)))
      (for-each (lambda (pair) (vector-set! new-vect (car pair) (cdr pair)))
              alist)
      (make-int-map new-vect)))
--- 164,170 ----
  
  (define (alist->int-map alist map-size . user-default)
    (let* ((default-val (:optional user-default #f))
!        (new-vect    (make-vector map-size default-val)))
      (for-each (lambda (pair) (vector-set! new-vect (car pair) (cdr pair)))
              alist)
      (make-int-map new-vect)))

<Prev in Thread] Current Thread [Next in Thread>
  • Functional PostScript alist->int-map correction, stktrc <=