|
@@ -144,6 +144,29 @@ return $1;
|
|
messageSends: ["do:", "add:"]}),
|
|
messageSends: ["do:", "add:"]}),
|
|
smalltalk.Collection);
|
|
smalltalk.Collection);
|
|
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "anySatisfy:",
|
|
|
|
+fn: function (aBlock){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+var $1;
|
|
|
|
+var $early={};
|
|
|
|
+try {
|
|
|
|
+_st(self)._do_((function(each){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
|
+$1=_st(aBlock)._value_(each);
|
|
|
|
+if(smalltalk.assert($1)){
|
|
|
|
+throw $early=[true];
|
|
|
|
+};
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
|
|
|
+return false;
|
|
|
|
+}
|
|
|
|
+catch(e) {if(e===$early)return e[0]; throw e}
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"anySatisfy:",{aBlock:aBlock},smalltalk.Collection)})},
|
|
|
|
+messageSends: ["do:", "ifTrue:", "value:"]}),
|
|
|
|
+smalltalk.Collection);
|
|
|
|
+
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "asArray",
|
|
selector: "asArray",
|
|
@@ -220,6 +243,19 @@ return $1;
|
|
messageSends: ["writeStream", "new", "class", "do:", "nextPut:", "value:", "contents"]}),
|
|
messageSends: ["writeStream", "new", "class", "do:", "nextPut:", "value:", "contents"]}),
|
|
smalltalk.Collection);
|
|
smalltalk.Collection);
|
|
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "contains:",
|
|
|
|
+fn: function (aBlock){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+var $1;
|
|
|
|
+$1=_st(self)._anySatisfy_(aBlock);
|
|
|
|
+return $1;
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"contains:",{aBlock:aBlock},smalltalk.Collection)})},
|
|
|
|
+messageSends: ["anySatisfy:"]}),
|
|
|
|
+smalltalk.Collection);
|
|
|
|
+
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "copyWith:",
|
|
selector: "copyWith:",
|