Changeset 38872 in project
- Timestamp:
- 08/22/20 20:08:55 (5 months ago)
- Location:
- release/5/slib-arraymap/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
release/5/slib-arraymap/trunk/slib-arraymap.egg
r38719 r38872 2 2 ;;;; Kon Lovett, Mar '20 3 3 4 ((synopsis "The SLIB applicative routines for arrays library")5 (version "1. 1.1")4 ((synopsis "The SLIB applicative routines for the arrays library") 5 (version "1.2.1") 6 6 (author "Aubrey Jaffer") 7 7 (maintainer "[[kon lovett]]") … … 9 9 (license "Artistic") 10 10 (category data) 11 (dependencies 12 (srfi-63 "0.5") ) 11 (dependencies srfi-1 srfi-63) 13 12 (test-dependencies test) 14 13 (components 15 14 (extension slib-arraymap 16 15 (types-file) 17 (csc-options 18 "-O3" "-d1" "-local" 19 "-no-procedure-checks-for-toplevel-bindings") ) ) ) 16 (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks-for-toplevel-bindings") ) ) ) -
release/5/slib-arraymap/trunk/slib-arraymap.scm
r38722 r38872 10 10 array-index-for-each 11 11 array-index-map! 12 array :copy!12 array-copy! 13 13 array-copy 14 array-fold) 14 array-fold 15 ; 16 array:copy!) 15 17 16 18 (import scheme) 17 19 (import (chicken module)) 18 (import (only (chicken base) include)) 20 (import (only (chicken base) include cut)) 21 (import (rename (chicken base) (sub1 1-) (add1 1+))) 19 22 (import (chicken type)) 23 (import (only (srfi 1) reverse!)) 20 24 (import (srfi 63)) 21 25 … … 36 40 (: array-index-map! (array (#!rest -> *) -> void)) 37 41 (: array:copy! (array array -> void)) 42 (: array-copy! (array array -> void)) 38 43 39 44 (: array-copy (array -> array)) 40 (: array-fold ( procedure * #!rest array -> *))45 (: array-fold (('r #!rest -> 'r) 'r #!rest array -> 'r)) 41 46 42 47 (include "arraymap") 48 49 (define array-copy! array:copy!) 43 50 44 51 (define (array-copy src) … … 51 58 (if (null? (cdr rdims)) 52 59 (let* ( 53 (sdni (reverse (cons #f inds)))60 (sdni (reverse! (cons #f inds))) 54 61 (lastpair (last-pair sdni)) ) 55 (do ((i 0 ( + 1i)))56 ((> i ( + -1(car rdims))))62 (do ((i 0 (1+ i))) 63 ((> i (1- (car rdims)))) 57 64 (set-car! lastpair i) 58 (set! seed (apply proc seed (map ( lambda (x) (apply array-ref x sdni)) ras))) ) )65 (set! seed (apply proc seed (map (cut apply array-ref <> sdni) ras))) ) ) 59 66 (let ( 60 67 (crdims (cdr rdims)) 61 (ll ( + -1(car rdims))) )62 (do ((i 0 ( + 1i)))68 (ll (1- (car rdims))) ) 69 (do ((i 0 (1+ i))) 63 70 ((> i ll)) 64 71 (rafo crdims (cons i inds)) ) ) ) ) -
release/5/slib-arraymap/trunk/tests/slib-arraymap-test.scm
r38401 r38872 20 20 (test-assert "TBD array-index-for-each" array-index-for-each) 21 21 (test-assert "TBD array-index-map!" array-index-map!) 22 (test-assert "TBD array :copy!" array:copy!)22 (test-assert "TBD array-copy!" array-copy!) 23 23 24 24 (let* (
Note: See TracChangeset
for help on using the changeset viewer.