Mercurial > repos > rhope
comparison functional.rhope @ 98:a34a982ecd32
Broken port of nworker to compiler
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 03 Aug 2010 23:51:39 -0400 |
parents | e73a93fb5de1 |
children | f4fc0a98088a |
comparison
equal
deleted
inserted
replaced
97:fa437d23bb24 | 98:a34a982ecd32 |
---|---|
89 }{ | 89 }{ |
90 out <- list | 90 out <- list |
91 } | 91 } |
92 } | 92 } |
93 | 93 |
94 _Zip[left,lindex,right,rindex,outlist:out] | |
95 { | |
96 nlist <- [outlist]Append[ | |
97 [[()]Append[ [left]Index[lindex] ]]Append[ [right]Index[rindex] ] | |
98 ] | |
99 nlindex <- [left]Next[lindex] | |
100 { | |
101 [right]Next[rindex] | |
102 { | |
103 out <- _Zip[left,nlindex,right,~,nlist] | |
104 }{ | |
105 out <- Val[nlist] | |
106 } | |
107 }{ | |
108 out <- Val[nlist] | |
109 } | |
110 } | |
111 | |
112 Zip[left,right:out] | |
113 { | |
114 lindex <- [left]First | |
115 { | |
116 [right]First | |
117 { | |
118 out <- _Zip[left,lindex,right,~,()] | |
119 }{ | |
120 out <- () | |
121 } | |
122 }{ | |
123 out <- () | |
124 } | |
125 } | |
126 |