|
@@ -2672,6 +2672,22 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Array);
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "at:ifPresent:ifAbsent:",
|
|
|
+category: 'accessing',
|
|
|
+fn: function (anIndex,aBlock,anotherBlock){
|
|
|
+var self=this;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+return anIndex < 1 || self.length < anIndex ? anotherBlock._value() : aBlock._value_(self[anIndex - 1]);;
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:ifAbsent:",{anIndex:anIndex,aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Array)})},
|
|
|
+args: ["anIndex", "aBlock", "anotherBlock"],
|
|
|
+source: "at: anIndex ifPresent: aBlock ifAbsent: anotherBlock\x0a\x09<return anIndex < 1 || self.length < anIndex ? anotherBlock._value() : aBlock._value_(self[anIndex - 1]);>",
|
|
|
+messageSends: [],
|
|
|
+referencedClasses: []
|
|
|
+}),
|
|
|
+smalltalk.Array);
|
|
|
+
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "at:put:",
|
|
@@ -3522,6 +3538,25 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.String);
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "at:ifPresent:ifAbsent:",
|
|
|
+category: 'accessing',
|
|
|
+fn: function (anIndex,aBlock,anotherBlock){
|
|
|
+var self=this;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+
|
|
|
+ var result = String(self).charAt(anIndex - 1);
|
|
|
+ return result ? aBlock._value_(result) : anotherBlock._value();
|
|
|
+ ;
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:ifAbsent:",{anIndex:anIndex,aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.String)})},
|
|
|
+args: ["anIndex", "aBlock", "anotherBlock"],
|
|
|
+source: "at: anIndex ifPresent: aBlock ifAbsent: anotherBlock\x0a\x09<\x0a\x09\x09var result = String(self).charAt(anIndex - 1);\x0a\x09\x09return result ? aBlock._value_(result) : anotherBlock._value();\x0a\x09>",
|
|
|
+messageSends: [],
|
|
|
+referencedClasses: []
|
|
|
+}),
|
|
|
+smalltalk.String);
|
|
|
+
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "charCodeAt:",
|