Changeset 32337 in project
 Timestamp:
 04/21/15 22:54:59 (4 years ago)
 Location:
 release/5/srfi1/trunk
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

release/5/srfi1/trunk/srfi1.scm
r32318 r32337 6 6 7 7 (declare 8 (unit srfi1)9 8 (disableinterrupts) 10 (hide ##srfi1#cars+cdrs/notest ##srfi1#cdrs ##srfi1#cars+ ##srfi1#reallyappendmap ##srfi1#cars+cdrs+11 ##srfi1#cars+cdrs ##srfi1#lset2<=)12 9 (not standardbindings member assoc)) 13 10 14 (include "commondeclarations.scm") 11 (module srfi1 12 (xcons makelist listtabulate cons* listcopy 13 properlist? circularlist? dottedlist? notpair? nulllist? list= 14 circularlist length+ 15 iota 16 first second third fourth fifth sixth seventh eighth ninth tenth 17 car+cdr 18 take drop 19 takeright dropright 20 take! dropright! 21 splitat splitat! 22 last lastpair 23 zip unzip1 unzip2 unzip3 unzip4 unzip5 24 count 25 append! appendreverse appendreverse! concatenate concatenate! 26 unfold fold pairfold reduce 27 unfoldright foldright pairfoldright reduceright 28 appendmap appendmap! map! pairforeach filtermap mapinorder 29 filter partition remove 30 filter! partition! remove! 31 find findtail any every listindex 32 takewhile dropwhile takewhile! 33 span break span! break!) 34 35 (import (except scheme member assoc) chicken) 15 36 16 37 (registerfeature! 'srfi1) … … 1021 1042 1022 1043 ;;; We extend MAP to handle arguments of unequal length. 1023 (define map mapinorder)1044 ;(define map mapinorder) 1024 1045 1025 1046 … … 1630 1651 lists))) 1631 1652 lis1)))) 1653 1654 ) ; module 
release/5/srfi1/trunk/srfi1.types
r32318 r32337 1 1 ;; srfi1 * Scheme * 2 2 3 ( alistcons (forall (a b c) (#(procedure #:clean)alistcons (a b (listof c)) (pair a (pair b (listof c))))))4 ( alistcopy (forall (a) (#(procedure #:clean #:enforce)alistcopy ((listof a)) (listof a))))5 ( alistdelete (forall (a b) (#(procedure #:enforce)alistdelete (a (listof b) #!optional (procedure (a b) *)) list)))6 ( alistdelete! (forall (a b) (#(procedure #:enforce)alistdelete! (a (listof b) #!optional (procedure (a b) *)) undefined)))7 ( any (forall (a) (#(procedure #:enforce)any ((procedure (a #!rest) *) (listof a) #!rest list) *)))8 ( append! (#(procedure #:enforce)append! (#!rest list) list))9 10 ( appendmap11 (forall (a b) (#(procedure #:enforce) appendmap ((procedure (a #!rest) (listof b)) (listof a) #!rest list)3 (srfi1#alistcons (forall (a b c) (#(procedure #:clean) srfi1#alistcons (a b (listof c)) (pair a (pair b (listof c)))))) 4 (srfi1#alistcopy (forall (a) (#(procedure #:clean #:enforce) srfi1#alistcopy ((listof a)) (listof a)))) 5 (srfi1#alistdelete (forall (a b) (#(procedure #:enforce) srfi1#alistdelete (a (listof b) #!optional (procedure (a b) *)) list))) 6 (srfi1#alistdelete! (forall (a b) (#(procedure #:enforce) srfi1#alistdelete! (a (listof b) #!optional (procedure (a b) *)) undefined))) 7 (srfi1#any (forall (a) (#(procedure #:enforce) srfi1#any ((procedure (a #!rest) *) (listof a) #!rest list) *))) 8 (srfi1#append! (#(procedure #:enforce) srfi1#append! (#!rest list) list)) 9 10 (srfi1#appendmap 11 (forall (a b) (#(procedure #:enforce) srfi1#appendmap ((procedure (a #!rest) (listof b)) (listof a) #!rest list) 12 12 (listof b)))) 13 13 14 ( appendmap!15 (forall (a b) (#(procedure #:enforce) appendmap! ((procedure (a #!rest) (listof b)) (listof a) #!rest list)14 (srfi1#appendmap! 15 (forall (a b) (#(procedure #:enforce) srfi1#appendmap! ((procedure (a #!rest) (listof b)) (listof a) #!rest list) 16 16 (listof b)))) 17 17 18 ( appendreverse (#(procedure #:clean #:enforce)appendreverse (list list) list))19 ( appendreverse! (#(procedure #:enforce)appendreverse! (list list) list))20 ( break (forall (a) (#(procedure #:enforce)break ((procedure (a) *) (listof a)) (listof a) (listof a))))21 ( break! (forall (a) (#(procedure #:enforce)break! ((procedure (a) *) (listof a)) (listof a) (listof a))))22 ( car+cdr (forall (a b) (#(procedure #:clean #:enforce)car+cdr ((pair a b)) a b)))23 ( circularlist (#(procedure #:clean)circularlist (#!rest) list))24 25 ( circularlist? (#(procedure #:clean #:foldable)circularlist? (*) boolean)18 (srfi1#appendreverse (#(procedure #:clean #:enforce) srfi1#appendreverse (list list) list)) 19 (srfi1#appendreverse! (#(procedure #:enforce) srfi1#appendreverse! (list list) list)) 20 (srfi1#break (forall (a) (#(procedure #:enforce) srfi1#break ((procedure (a) *) (listof a)) (listof a) (listof a)))) 21 (srfi1#break! (forall (a) (#(procedure #:enforce) srfi1#break! ((procedure (a) *) (listof a)) (listof a) (listof a)))) 22 (srfi1#car+cdr (forall (a b) (#(procedure #:clean #:enforce) srfi1#car+cdr ((pair a b)) a b))) 23 (srfi1#circularlist (#(procedure #:clean) srfi1#circularlist (#!rest) list)) 24 25 (srfi1#circularlist? (#(procedure #:clean #:foldable) srfi1#circularlist? (*) boolean) 26 26 ((null) (let ((#(tmp) #(1))) '#f))) 27 27 28 ( concatenate (#(procedure #:clean #:enforce)concatenate ((listof list)) list))29 ( concatenate! (#(procedure #:enforce)concatenate! ((listof list)) list))30 ( cons* (forall (a) (#(procedure #:clean)cons* (a #!rest) (pair a *))))31 ( count (forall (a) (#(procedure #:enforce)count ((procedure (a #!rest) *) (listof a) #!rest list) fixnum)))32 ( delete (forall (a b) (#(procedure #:enforce)delete (a (listof b) #!optional (procedure (a *) *)) (listof b))))33 ( delete! (forall (a b) (#(procedure #:enforce)delete! (a (listof b) #!optional (procedure (a *) *)) (listof b))))34 35 ( deleteduplicates36 (forall (a) (#(procedure #:enforce) deleteduplicates ((listof a) #!optional (procedure (a *) *)) (listof a))))37 38 ( deleteduplicates!39 (forall (a) (#(procedure #:enforce) deleteduplicates! ((listof a) #!optional (procedure (a *) *)) (listof a))))40 41 ( dottedlist? (#(procedure #:clean #:foldable)dottedlist? (*) boolean))42 ( drop (forall (a) (#(procedure #:enforce)drop ((listof a) fixnum) (listof a))))43 ( dropright (forall (a) (#(procedure #:enforce)dropright ((listof a) fixnum) (listof a))))44 ( dropright! (forall (a) (#(procedure #:enforce)dropright! ((listof a) fixnum) (listof a))))45 ( dropwhile (forall (a) (#(procedure #:enforce)dropwhile ((procedure (a) *) (listof a)) (listof a))))46 ( eighth (#(procedure #:clean #:enforce #:foldable)eighth (pair) *))47 48 ( every49 (forall (a) (#(procedure #:enforce) every ((procedure (a #!rest) *) (listof a) #!rest list) *)))50 51 ( fifth (#(procedure #:clean #:enforce #:foldable)fifth (pair) *))52 ( filter (forall (a) (#(procedure #:enforce)filter ((procedure (a) *) (listof a)) (listof a))))53 ( filter! (forall (a) (#(procedure #:enforce)filter! ((procedure (a) *) (listof a)) (listof a))))54 55 ( filtermap56 (forall (a b) (#(procedure #:enforce) filtermap ((procedure (a #!rest) b) (listof a) #!rest list) (listof b))))57 58 ( find (forall (a) (#(procedure #:enforce)find ((procedure (a) *) (listof a)) *)))59 ( findtail (forall (a) (#(procedure #:enforce)findtail ((procedure (a) *) (listof a)) *)))60 61 ( first (forall (a) (#(procedure #:clean #:enforce #:foldable)first ((pair a *)) a))28 (srfi1#concatenate (#(procedure #:clean #:enforce) srfi1#concatenate ((listof list)) list)) 29 (srfi1#concatenate! (#(procedure #:enforce) srfi1#concatenate! ((listof list)) list)) 30 (srfi1#cons* (forall (a) (#(procedure #:clean) srfi1#cons* (a #!rest) (pair a *)))) 31 (srfi1#count (forall (a) (#(procedure #:enforce) srfi1#count ((procedure (a #!rest) *) (listof a) #!rest list) fixnum))) 32 (srfi1#delete (forall (a b) (#(procedure #:enforce) srfi1#delete (a (listof b) #!optional (procedure (a *) *)) (listof b)))) 33 (srfi1#delete! (forall (a b) (#(procedure #:enforce) srfi1#delete! (a (listof b) #!optional (procedure (a *) *)) (listof b)))) 34 35 (srfi1#deleteduplicates 36 (forall (a) (#(procedure #:enforce) srfi1#deleteduplicates ((listof a) #!optional (procedure (a *) *)) (listof a)))) 37 38 (srfi1#deleteduplicates! 39 (forall (a) (#(procedure #:enforce) srfi1#deleteduplicates! ((listof a) #!optional (procedure (a *) *)) (listof a)))) 40 41 (srfi1#dottedlist? (#(procedure #:clean #:foldable) srfi1#dottedlist? (*) boolean)) 42 (srfi1#drop (forall (a) (#(procedure #:enforce) srfi1#drop ((listof a) fixnum) (listof a)))) 43 (srfi1#dropright (forall (a) (#(procedure #:enforce) srfi1#dropright ((listof a) fixnum) (listof a)))) 44 (srfi1#dropright! (forall (a) (#(procedure #:enforce) srfi1#dropright! ((listof a) fixnum) (listof a)))) 45 (srfi1#dropwhile (forall (a) (#(procedure #:enforce) srfi1#dropwhile ((procedure (a) *) (listof a)) (listof a)))) 46 (srfi1#eighth (#(procedure #:clean #:enforce #:foldable) srfi1#eighth (pair) *)) 47 48 (srfi1#every 49 (forall (a) (#(procedure #:enforce) srfi1#every ((procedure (a #!rest) *) (listof a) #!rest list) *))) 50 51 (srfi1#fifth (#(procedure #:clean #:enforce #:foldable) srfi1#fifth (pair) *)) 52 (srfi1#filter (forall (a) (#(procedure #:enforce) srfi1#filter ((procedure (a) *) (listof a)) (listof a)))) 53 (srfi1#filter! (forall (a) (#(procedure #:enforce) srfi1#filter! ((procedure (a) *) (listof a)) (listof a)))) 54 55 (srfi1#filtermap 56 (forall (a b) (#(procedure #:enforce) srfi1#filtermap ((procedure (a #!rest) b) (listof a) #!rest list) (listof b)))) 57 58 (srfi1#find (forall (a) (#(procedure #:enforce) srfi1#find ((procedure (a) *) (listof a)) *))) 59 (srfi1#findtail (forall (a) (#(procedure #:enforce) srfi1#findtail ((procedure (a) *) (listof a)) *))) 60 61 (srfi1#first (forall (a) (#(procedure #:clean #:enforce #:foldable) srfi1#first ((pair a *)) a)) 62 62 ((pair) (##core#inline "C_u_i_car" #(1)))) 63 63 64 ( fold (#(procedure #:enforce)fold ((procedure (* #!rest) *) * #!rest list) *)) ;XXX65 ( foldright (#(procedure #:enforce)foldright ((procedure (* #!rest) *) * #!rest list) *)) ;XXX66 67 ( fourth (forall (a) (#(procedure #:clean #:enforce #:foldable)fourth ((pair * (pair * (pair * (pair a *))))) a))64 (srfi1#fold (#(procedure #:enforce) srfi1#fold ((procedure (* #!rest) *) * #!rest list) *)) ;XXX 65 (srfi1#foldright (#(procedure #:enforce) srfi1#foldright ((procedure (* #!rest) *) * #!rest list) *)) ;XXX 66 67 (srfi1#fourth (forall (a) (#(procedure #:clean #:enforce #:foldable) srfi1#fourth ((pair * (pair * (pair * (pair a *))))) a)) 68 68 (((pair * (pair * (pair * (pair * *))))) 69 69 (##core#inline "C_u_i_car" … … 72 72 (##core#inline "C_u_i_cdr" #(1))))))) 73 73 74 ( iota (#(procedure #:clean #:enforce)iota (fixnum #!optional fixnum fixnum) (listof number)))75 ( last (#(procedure #:clean #:enforce #:foldable)last (pair) *))76 ( lastpair (#(procedure #:clean #:enforce #:foldable)lastpair (pair) *))77 ( length+ (#(procedure #:clean #:enforce #:foldable)length+ (list) *))78 ( listcopy (forall (a) (#(procedure #:pure)listcopy (a) a)))79 ( listindex (forall (a) (#(procedure #:enforce)listindex ((procedure (a #!rest) *) (listof a) #!rest list) *)))80 ( listtabulate (forall (a) (#(procedure #:enforce)listtabulate (fixnum (procedure (fixnum) a)) (listof a))))81 ( list= (#(procedure #:clean #:enforce)list= (#!optional (procedure (list list) *) #!rest list) boolean)74 (srfi1#iota (#(procedure #:clean #:enforce) srfi1#iota (fixnum #!optional fixnum fixnum) (listof number))) 75 (srfi1#last (#(procedure #:clean #:enforce #:foldable) srfi1#last (pair) *)) 76 (srfi1#lastpair (#(procedure #:clean #:enforce #:foldable) srfi1#lastpair (pair) *)) 77 (srfi1#length+ (#(procedure #:clean #:enforce #:foldable) srfi1#length+ (list) *)) 78 (srfi1#listcopy (forall (a) (#(procedure #:pure) srfi1#listcopy (a) a))) 79 (srfi1#listindex (forall (a) (#(procedure #:enforce) srfi1#listindex ((procedure (a #!rest) *) (listof a) #!rest list) *))) 80 (srfi1#listtabulate (forall (a) (#(procedure #:enforce) srfi1#listtabulate (fixnum (procedure (fixnum) a)) (listof a)))) 81 (srfi1#list= (#(procedure #:clean #:enforce) srfi1#list= (#!optional (procedure (list list) *) #!rest list) boolean) 82 82 (() '#t) 83 83 ((procedure) (let ((#(tmp) #(1))) '#t))) 84 84 85 ( lsetadjoin86 (forall (a) (#(procedure #:enforce) lsetadjoin ((procedure (a a) *) (listof a) #!rest a) (listof a)))87 ((procedure list) (let ((#(tmp) #(1))) #(2)))) 88 89 ( lsetdiff+intersection85 (srfi1#lsetadjoin 86 (forall (a) (#(procedure #:enforce) srfi1#lsetadjoin ((procedure (a a) *) (listof a) #!rest a) (listof a))) 87 ((procedure list) (let ((#(tmp) #(1))) #(2)))) 88 89 (srfi1#lsetdiff+intersection 90 90 (forall (a) 91 (#(procedure #:enforce) lsetdiff+intersection ((procedure (a a) *) (listof a) #!rest (listof a))91 (#(procedure #:enforce) srfi1#lsetdiff+intersection ((procedure (a a) *) (listof a) #!rest (listof a)) 92 92 (listof a) (listof a))) 93 93 ((procedure list) (let ((#(tmp) #(1))) (##sys#values #(2) '())))) 94 94 95 ( lsetdiff+intersection!95 (srfi1#lsetdiff+intersection! 96 96 (forall (a) 97 (#(procedure #:enforce) lsetdiff+intersection! ((procedure (a a) *) (listof a) #!rest (listof a))97 (#(procedure #:enforce) srfi1#lsetdiff+intersection! ((procedure (a a) *) (listof a) #!rest (listof a)) 98 98 (listof a) (listof a))) 99 99 ((procedure list) (let ((#(tmp) #(1))) (##sys#values #(2) '())))) 100 100 101 ( lsetdifference102 (forall (a) (#(procedure #:enforce) lsetdifference ((procedure (a a) *) (listof a) #!rest (listof a)) (listof a)))103 ((procedure list) (let ((#(tmp) #(1))) #(2)))) 104 105 ( lsetdifference!106 (forall (a) (#(procedure #:enforce) lsetdifference! ((procedure (a a) *) (listof a) #!rest (listof a)) (listof a)))107 ((procedure list) (let ((#(tmp) #(1))) #(2)))) 108 109 ( lsetintersection110 (forall (a) (#(procedure #:enforce) lsetintersection ((procedure (a a) *) (listof a) #!rest (listof a)) (listof a)))111 ((procedure list) (let ((#(tmp) #(1))) #(2)))) 112 113 ( lsetintersection!114 (forall (a) (#(procedure #:enforce) lsetintersection! ((procedure (a a) *) (listof a) #!rest (listof a)) (listof a)))115 ((procedure list) (let ((#(tmp) #(1))) #(2)))) 116 117 ( lsetunion118 (forall (a) (#(procedure #:enforce) lsetunion ((procedure (a a) *) #!rest (listof a)) (listof a)))119 ((procedure) (let ((#(tmp) #(1))) '())) 120 ((procedure list) (let ((#(tmp) #(1))) #(2)))) 121 122 ( lsetunion!123 (forall (a) (#(procedure #:enforce) lsetunion! ((procedure (a a) *) #!rest (listof a)) (listof a)))124 ((procedure) (let ((#(tmp) #(1))) '())) 125 ((procedure list) (let ((#(tmp) #(1))) #(2)))) 126 127 ( lsetxor128 (forall (a) (#(procedure #:enforce) lsetxor ((procedure (a a) *) #!rest (listof a)) (listof a)))129 ((procedure) (let ((#(tmp) #(1))) '())) 130 ((procedure list) (let ((#(tmp) #(1))) #(2)))) 131 132 ( lsetxor!133 (forall (a) (#(procedure #:enforce) lsetxor! ((procedure (a a) *) #!rest (listof a)) (listof a)))134 ((procedure) (let ((#(tmp) #(1))) '())) 135 ((procedure list) (let ((#(tmp) #(1))) #(2)))) 136 137 ( lset<=138 (forall (a) (#(procedure #:enforce) lset<= ((procedure (a a) *) #!rest (listof a)) boolean))101 (srfi1#lsetdifference 102 (forall (a) (#(procedure #:enforce) srfi1#lsetdifference ((procedure (a a) *) (listof a) #!rest (listof a)) (listof a))) 103 ((procedure list) (let ((#(tmp) #(1))) #(2)))) 104 105 (srfi1#lsetdifference! 106 (forall (a) (#(procedure #:enforce) srfi1#lsetdifference! ((procedure (a a) *) (listof a) #!rest (listof a)) (listof a))) 107 ((procedure list) (let ((#(tmp) #(1))) #(2)))) 108 109 (srfi1#lsetintersection 110 (forall (a) (#(procedure #:enforce) srfi1#lsetintersection ((procedure (a a) *) (listof a) #!rest (listof a)) (listof a))) 111 ((procedure list) (let ((#(tmp) #(1))) #(2)))) 112 113 (srfi1#lsetintersection! 114 (forall (a) (#(procedure #:enforce) srfi1#lsetintersection! ((procedure (a a) *) (listof a) #!rest (listof a)) (listof a))) 115 ((procedure list) (let ((#(tmp) #(1))) #(2)))) 116 117 (srfi1#lsetunion 118 (forall (a) (#(procedure #:enforce) srfi1#lsetunion ((procedure (a a) *) #!rest (listof a)) (listof a))) 119 ((procedure) (let ((#(tmp) #(1))) '())) 120 ((procedure list) (let ((#(tmp) #(1))) #(2)))) 121 122 (srfi1#lsetunion! 123 (forall (a) (#(procedure #:enforce) srfi1#lsetunion! ((procedure (a a) *) #!rest (listof a)) (listof a))) 124 ((procedure) (let ((#(tmp) #(1))) '())) 125 ((procedure list) (let ((#(tmp) #(1))) #(2)))) 126 127 (srfi1#lsetxor 128 (forall (a) (#(procedure #:enforce) srfi1#lsetxor ((procedure (a a) *) #!rest (listof a)) (listof a))) 129 ((procedure) (let ((#(tmp) #(1))) '())) 130 ((procedure list) (let ((#(tmp) #(1))) #(2)))) 131 132 (srfi1#lsetxor! 133 (forall (a) (#(procedure #:enforce) srfi1#lsetxor! ((procedure (a a) *) #!rest (listof a)) (listof a))) 134 ((procedure) (let ((#(tmp) #(1))) '())) 135 ((procedure list) (let ((#(tmp) #(1))) #(2)))) 136 137 (srfi1#lset<= 138 (forall (a) (#(procedure #:enforce) srfi1#lset<= ((procedure (a a) *) #!rest (listof a)) boolean)) 139 139 ((procedure) (let ((#(tmp) #(1))) '#t)) 140 140 ((procedure list) (let ((#(tmp1) #(1)) (#(tmp2) #(2))) '#t))) 141 141 142 ( lset=143 (forall (a) (#(procedure #:enforce) lset= ((procedure (a a) *) #!rest (listof a)) boolean))142 (srfi1#lset= 143 (forall (a) (#(procedure #:enforce) srfi1#lset= ((procedure (a a) *) #!rest (listof a)) boolean)) 144 144 ((procedure) (let ((#(tmp) #(1))) '#t)) 145 145 ((procedure list) (let ((#(tmp1) #(1)) (#(tmp2) #(2))) '#t))) 146 146 147 ( makelist (forall (a) (#(procedure #:clean #:enforce)makelist (fixnum #!optional a) (listof a))))148 149 ( map!150 (forall (a b) (#(procedure #:enforce) map! ((procedure (a #!rest) b) (listof a) #!rest list) (listof b))))151 152 ( mapinorder147 (srfi1#makelist (forall (a) (#(procedure #:clean #:enforce) srfi1#makelist (fixnum #!optional a) (listof a)))) 148 149 (srfi1#map! 150 (forall (a b) (#(procedure #:enforce) srfi1#map! ((procedure (a #!rest) b) (listof a) #!rest list) (listof b)))) 151 152 (srfi1#mapinorder 153 153 (forall 154 154 (a b) 155 (#(procedure #:enforce) mapinorder ((procedure (a #!rest) b) (listof a) #!rest list) (listof b))))156 157 ( ninth (#(procedure #:clean #:enforce #:foldable)ninth (pair) *))158 159 ( notpair? (#(procedure #:clean #:foldable)notpair? (*) boolean)155 (#(procedure #:enforce) srfi1#mapinorder ((procedure (a #!rest) b) (listof a) #!rest list) (listof b)))) 156 157 (srfi1#ninth (#(procedure #:clean #:enforce #:foldable) srfi1#ninth (pair) *)) 158 159 (srfi1#notpair? (#(procedure #:clean #:foldable) srfi1#notpair? (*) boolean) 160 160 ((pair) (let ((#(tmp) #(1))) '#f)) 161 161 (((not (or pair list))) (let ((#(tmp) #(1))) '#t))) 162 162 163 ( nulllist? (#(procedure #:clean #:enforce #:foldable)nulllist? (list) boolean)163 (srfi1#nulllist? (#(procedure #:clean #:enforce #:foldable) srfi1#nulllist? (list) boolean) 164 164 ((pair) (let ((#(tmp) #(1))) '#f)) 165 165 ((list) (let ((#(tmp) #(1))) '#f)) 166 166 ((null) (let ((#(tmp) #(1))) '#t))) 167 167 168 ( pairfold (#(procedure #:enforce)pairfold (procedure * list #!rest list) *)) ;XXX do this169 ( pairfoldright (#(procedure #:enforce)pairfoldright (procedure * list #!rest list) *)) ;XXX170 ( pairforeach (#(procedure #:enforce)pairforeach ((procedure (#!rest) . *) list #!rest list) undefined)) ;XXX171 ( partition (forall (a) (#(procedure #:enforce)partition ((procedure (a) *) (listof a)) (listof a) (listof a))))172 ( partition! (forall (a) (#(procedure #:enforce)partition! ((procedure (a) *) (listof a)) (listof a) (listof a))))173 174 ( properlist? (#(procedure #:clean #:foldable) properlist? (*) boolean)168 (srfi1#pairfold (#(procedure #:enforce) srfi1#pairfold (procedure * list #!rest list) *)) ;XXX do this 169 (srfi1#pairfoldright (#(procedure #:enforce) srfi1#pairfoldright (procedure * list #!rest list) *)) ;XXX 170 (srfi1#pairforeach (#(procedure #:enforce) srfi1#pairforeach ((procedure (#!rest) . *) list #!rest list) undefined)) ;XXX 171 (srfi1#partition (forall (a) (#(procedure #:enforce) srfi1#partition ((procedure (a) *) (listof a)) (listof a) (listof a)))) 172 (srfi1#partition! (forall (a) (#(procedure #:enforce) srfi1#partition! ((procedure (a) *) (listof a)) (listof a) (listof a)))) 173 174 (srfi1#properlist? (#(procedure #:clean #:foldable) properlist? (*) boolean) 175 175 ((null) (let ((#(tmp) #(1))) '#t))) 176 176 177 ( reduce (#(procedure #:enforce)reduce ((procedure (* *) *) * list) *)) ;XXX178 ( reduceright (#(procedure #:enforce)reduceright ((procedure (* *) *) * list) *)) ;XXX179 ( remove (forall (a) (#(procedure #:enforce)remove ((procedure (a) *) (listof a)) (listof a))))180 ( remove! (forall (a) (#(procedure #:enforce)remove! ((procedure (a) *) (listof a)) (listof a))))181 ( reverse! (forall (a) (#(procedure #:enforce)reverse! ((listof a)) (listof a))))182 183 (s econd (forall (a) (#(procedure #:clean #:enforce #:foldable)second ((pair * (pair a *))) a))177 (srfi1#reduce (#(procedure #:enforce) srfi1#reduce ((procedure (* *) *) * list) *)) ;XXX 178 (srfi1#reduceright (#(procedure #:enforce) srfi1#reduceright ((procedure (* *) *) * list) *)) ;XXX 179 (srfi1#remove (forall (a) (#(procedure #:enforce) srfi1#remove ((procedure (a) *) (listof a)) (listof a)))) 180 (srfi1#remove! (forall (a) (#(procedure #:enforce) srfi1#remove! ((procedure (a) *) (listof a)) (listof a)))) 181 (srfi1#reverse! (forall (a) (#(procedure #:enforce) srfi1#reverse! ((listof a)) (listof a)))) 182 183 (srfi1#second (forall (a) (#(procedure #:clean #:enforce #:foldable) srfi1#second ((pair * (pair a *))) a)) 184 184 (((pair * (pair * *))) (##core#inline "C_u_i_car" (##core#inline "C_u_i_cdr" #(1))))) 185 185 186 (s eventh (#(procedure #:clean #:enforce #:foldable)seventh (pair) *))187 (s ixth (#(procedure #:clean #:enforce #:foldable)sixth (pair) *))188 (s pan (forall (a) (#(procedure #:enforce)span ((procedure (a) *) (listof a)) (listof a) (listof a))))189 (s pan! (forall (a) (#(procedure #:enforce)span! ((procedure (a) *) (listof a)) (listof a) (listof a))))190 (s plitat (forall (a) (#(procedure #:enforce)splitat ((listof a) fixnum) (listof a) (listof a))))191 (s plitat! (forall (a) (#(procedure #:enforce)splitat! ((listof a) fixnum) (listof a) (listof a))))192 ( take (forall (a) (#(procedure #:enforce)take ((listof a) fixnum) (listof a))))193 ( take! (forall (a) (#(procedure #:enforce)take! ((listof a) fixnum) (listof a))))194 ( takeright (forall (a) (#(procedure #:enforce)takeright ((listof a) fixnum) (listof a))))195 ( takewhile (forall (a) (#(procedure #:enforce)takewhile ((procedure (a) *) (listof a)) (listof a))))196 ( takewhile! (forall (a) (#(procedure #:enforce)takewhile! ((procedure (a) *) (listof a)) (listof a))))197 ( tenth (#(procedure #:clean #:enforce #:foldable)tenth (pair) *))198 199 ( third (forall (a) (#(procedure #:clean #:enforce #:foldable)third ((pair * (pair * (pair a *)))) a))186 (srfi1#seventh (#(procedure #:clean #:enforce #:foldable) srfi1#seventh (pair) *)) 187 (srfi1#sixth (#(procedure #:clean #:enforce #:foldable) srfi1#sixth (pair) *)) 188 (srfi1#span (forall (a) (#(procedure #:enforce) srfi1#span ((procedure (a) *) (listof a)) (listof a) (listof a)))) 189 (srfi1#span! (forall (a) (#(procedure #:enforce) srfi1#span! ((procedure (a) *) (listof a)) (listof a) (listof a)))) 190 (srfi1#splitat (forall (a) (#(procedure #:enforce) srfi1#splitat ((listof a) fixnum) (listof a) (listof a)))) 191 (srfi1#splitat! (forall (a) (#(procedure #:enforce) srfi1#splitat! ((listof a) fixnum) (listof a) (listof a)))) 192 (srfi1#take (forall (a) (#(procedure #:enforce) srfi1#take ((listof a) fixnum) (listof a)))) 193 (srfi1#take! (forall (a) (#(procedure #:enforce) srfi1#take! ((listof a) fixnum) (listof a)))) 194 (srfi1#takeright (forall (a) (#(procedure #:enforce) srfi1#takeright ((listof a) fixnum) (listof a)))) 195 (srfi1#takewhile (forall (a) (#(procedure #:enforce) srfi1#takewhile ((procedure (a) *) (listof a)) (listof a)))) 196 (srfi1#takewhile! (forall (a) (#(procedure #:enforce) srfi1#takewhile! ((procedure (a) *) (listof a)) (listof a)))) 197 (srfi1#tenth (#(procedure #:clean #:enforce #:foldable) srfi1#tenth (pair) *)) 198 199 (srfi1#third (forall (a) (#(procedure #:clean #:enforce #:foldable) srfi1#third ((pair * (pair * (pair a *)))) a)) 200 200 (((pair * (pair * (pair * *)))) 201 201 (##core#inline "C_u_i_car" 202 202 (##core#inline "C_u_i_cdr" (##core#inline "C_u_i_cdr" #(1)))))) 203 203 204 ( unfold (#(procedure #:enforce)unfold ((procedure (*) *) (procedure (*) *) (procedure (*) *) * #!optional (procedure (*) *)) *)) ;XXX205 ( unfoldright (#(procedure #:enforce)unfoldright ((procedure (*) *) (procedure (*) *) (procedure (*) *) * #!optional (procedure (*) *)) *)) ;XXX206 ( unzip1 (forall (a) (#(procedure #:clean #:enforce)unzip1 ((listof (pair a *))) (listof a))))207 ( unzip2 (forall (a b) (#(procedure #:clean #:enforce)unzip2 ((listof (pair a (pair b *)))) (listof a) (listof b))))208 209 ( unzip3210 (forall (a b c) (#(procedure #:clean #:enforce) unzip3 ((listof (pair a (pair b (pair c *))))) (listof a) (listof b) (listof c))))211 212 ( unzip4 (#(procedure #:clean #:enforce)unzip4 (list) list list list list)) ; yeah213 ( unzip5 (#(procedure #:clean #:enforce)unzip5 (list) list list list list list)) ; yeah, too214 ( xcons (forall (a b) (#(procedure #:pure)xcons (a b) (pair b a))))215 ( zip (forall (a) (#(procedure #:clean #:enforce)zip ((listof a) #!rest list) (listof (pair a *)))))204 (srfi1#unfold (#(procedure #:enforce) srfi1#unfold ((procedure (*) *) (procedure (*) *) (procedure (*) *) * #!optional (procedure (*) *)) *)) ;XXX 205 (srfi1#unfoldright (#(procedure #:enforce) srfi1#unfoldright ((procedure (*) *) (procedure (*) *) (procedure (*) *) * #!optional (procedure (*) *)) *)) ;XXX 206 (srfi1#unzip1 (forall (a) (#(procedure #:clean #:enforce) srfi1#unzip1 ((listof (pair a *))) (listof a)))) 207 (srfi1#unzip2 (forall (a b) (#(procedure #:clean #:enforce) srfi1#unzip2 ((listof (pair a (pair b *)))) (listof a) (listof b)))) 208 209 (srfi1#unzip3 210 (forall (a b c) (#(procedure #:clean #:enforce) srfi1#unzip3 ((listof (pair a (pair b (pair c *))))) (listof a) (listof b) (listof c)))) 211 212 (srfi1#unzip4 (#(procedure #:clean #:enforce) srfi1#unzip4 (list) list list list list)) ; yeah 213 (srfi1#unzip5 (#(procedure #:clean #:enforce) srfi1#unzip5 (list) list list list list list)) ; yeah, too 214 (srfi1#xcons (forall (a b) (#(procedure #:pure) srfi1#xcons (a b) (pair b a)))) 215 (srfi1#zip (forall (a) (#(procedure #:clean #:enforce) srfi1#zip ((listof a) #!rest list) (listof (pair a *)))))
Note: See TracChangeset
for help on using the changeset viewer.