Changeset 35852 in project
 Timestamp:
 07/12/18 16:25:49 (2 years ago)
 Location:
 release/4/basicsequences
 Files:

 2 edited
 3 copied
Legend:
 Unmodified
 Added
 Removed

release/4/basicsequences/tags/2.2/basicsequences.scm
r35850 r35852 72 72 #f #t)))) 73 73 74 (define (taggedvector? xpr) 75 (and (vector? xpr) 76 (fx>= (vectorlength xpr) 1) 77 (let ((top (vectorref xpr 0))) 78 (conditioncase (and (thunk? top) 79 (keyword? (top))) 80 ((exn sequence) #t))))) 81 82 (define (taggedvector kw . args) 83 (let ((result (makevector (1+ (length args))))) 84 (vectorset! result 0 (thunk kw)) 85 (do ((args args (cdr args)) 86 (k 1 (1+ k))) 87 ((null? args) result) 88 (vectorset! result k (car args))))) 74 (definevalues (taggedvector taggedvector?) 75 (let ((type (gensym 'taggedvector))) 76 (values 77 (lambda (kw . args) 78 (let ((result (makevector (1+ (length args))))) 79 (vectorset! result 0 (thunk (values kw type))) 80 ;0 81 ;(lambda () 82 ; (values kw type))) 83 (do ((args args (cdr args)) 84 (k 1 (1+ k))) 85 ((null? args) result) 86 (vectorset! result k (car args))))) 87 (lambda (xpr) 88 (and (vector? xpr) 89 (fx>= (vectorlength xpr) 1) 90 (let ((top (vectorref xpr 0))) 91 (if (thunk? top) 92 (conditioncase 93 (receive (key sym) (top) 94 (and (keyword? key) 95 (symbol? sym) 96 (eq? sym type))) 97 ((exn) #f)) 98 #f))))))) 89 99 90 100 (define (taggedvectorref tv k) 
release/4/basicsequences/tags/2.2/basicsequences.setup
r35850 r35852 7 7 'basicsequences 8 8 '("basicsequences.so" "basicsequences.import.so") 9 '((version "2. 1")))9 '((version "2.2"))) 
release/4/basicsequences/trunk/basicsequences.scm
r35850 r35852 72 72 #f #t)))) 73 73 74 (define (taggedvector? xpr) 75 (and (vector? xpr) 76 (fx>= (vectorlength xpr) 1) 77 (let ((top (vectorref xpr 0))) 78 (conditioncase (and (thunk? top) 79 (keyword? (top))) 80 ((exn sequence) #t))))) 81 82 (define (taggedvector kw . args) 83 (let ((result (makevector (1+ (length args))))) 84 (vectorset! result 0 (thunk kw)) 85 (do ((args args (cdr args)) 86 (k 1 (1+ k))) 87 ((null? args) result) 88 (vectorset! result k (car args))))) 74 (definevalues (taggedvector taggedvector?) 75 (let ((type (gensym 'taggedvector))) 76 (values 77 (lambda (kw . args) 78 (let ((result (makevector (1+ (length args))))) 79 (vectorset! result 0 (thunk (values kw type))) 80 ;0 81 ;(lambda () 82 ; (values kw type))) 83 (do ((args args (cdr args)) 84 (k 1 (1+ k))) 85 ((null? args) result) 86 (vectorset! result k (car args))))) 87 (lambda (xpr) 88 (and (vector? xpr) 89 (fx>= (vectorlength xpr) 1) 90 (let ((top (vectorref xpr 0))) 91 (if (thunk? top) 92 (conditioncase 93 (receive (key sym) (top) 94 (and (keyword? key) 95 (symbol? sym) 96 (eq? sym type))) 97 ((exn) #f)) 98 #f))))))) 89 99 90 100 (define (taggedvectorref tv k) 
release/4/basicsequences/trunk/basicsequences.setup
r35850 r35852 7 7 'basicsequences 8 8 '("basicsequences.so" "basicsequences.import.so") 9 '((version "2. 1")))9 '((version "2.2")))
Note: See TracChangeset
for help on using the changeset viewer.