Diff
Not logged in

Differences From Artifact [e50284fdcde212f7]:

To Artifact [a04d420215bb851f]:


163 def revi(xs, ys) { 163 def revi(xs, ys) { 164 case xs 164 case xs 165 when {car: x, cdr: xs}: revi(xs, cons(x,ys)) 165 when {car: x, cdr: xs}: revi(xs, cons(x,ys)) 166 when {}: ys 166 when {}: ys 167 }; 167 }; 168 revi(xs, {}) 168 revi(xs, {}) 169 }; 169 }; > 170 > 171 def str_app(xs, ys) { > 172 case xs > 173 when {car: x, cdr: xs}: cons(""~x, str_app(xs, ys)) > 174 when {}: ys > 175 }; 170 176 171 var xs = cons(1, cons(2, cons(3, nil))); 177 var xs = cons(1, cons(2, cons(3, nil))); > 178 var ys = cons("four", cons("five", cons("six", nil))); 172 print( @type( rev(xs) ) ); 179 print( @type( rev(xs) ) ); > 180 print( @type( rev(ys) ) ); > 181 print( @type( str_app(xs,ys) ) ); > 182 print( @type( str_app(xs,xs) ) );