195 |
195 |
196 forLogical:arg1 and:arg2 |
196 forLogical:arg1 and:arg2 |
197 "return a new BlockValue computing the logical AND of its args |
197 "return a new BlockValue computing the logical AND of its args |
198 (which are usually other valueHolders)" |
198 (which are usually other valueHolders)" |
199 |
199 |
200 ^ (super new) |
200 ^ (self new) |
201 setBlock:[:a :b | a value and:[b value]] |
201 setBlock:[:a :b | a value and:[b value]] |
202 arguments:(Array with:arg1 with:arg2) |
202 arguments:(Array with:arg1 with:arg2) |
203 |
203 |
204 "Created: / 16.12.1995 / 19:20:14 / cg" |
204 "Created: / 16.12.1995 / 19:20:14 / cg" |
205 "Modified: / 30.1.2000 / 23:24:50 / cg" |
205 "Modified: / 30.1.2000 / 23:24:50 / cg" |
207 |
207 |
208 forLogical:arg1 or:arg2 |
208 forLogical:arg1 or:arg2 |
209 "return a new BlockValue computing the logical OR of its args |
209 "return a new BlockValue computing the logical OR of its args |
210 (which are usually other valueHolders)" |
210 (which are usually other valueHolders)" |
211 |
211 |
212 ^ (super new) |
212 ^ (self new) |
213 setBlock:[:a :b | a value or:[b value]] |
213 setBlock:[:a :b | a value or:[b value]] |
214 arguments:(Array with:arg1 with:arg2) |
214 arguments:(Array with:arg1 with:arg2) |
215 |
215 |
216 "Created: / 16.12.1995 / 19:20:14 / cg" |
216 "Created: / 16.12.1995 / 19:20:14 / cg" |
217 "Modified: / 30.1.2000 / 23:24:46 / cg" |
217 "Modified: / 30.1.2000 / 23:24:46 / cg" |
219 |
219 |
220 forLogicalAndAll:argArray |
220 forLogicalAndAll:argArray |
221 "return a new BlockValue computing the logical OR of all elements |
221 "return a new BlockValue computing the logical OR of all elements |
222 in the passed argArray (which are usually other valueHolders)" |
222 in the passed argArray (which are usually other valueHolders)" |
223 |
223 |
224 ^ (super new) |
224 ^ (self new) |
225 setBlock:[:a | (argArray findFirst:[:a | a value not]) == 0] |
225 setBlock:[:a | (argArray findFirst:[:a | a value not]) == 0] |
226 argumentArray:argArray asArray |
226 argumentArray:argArray asArray |
227 |
227 |
228 "Created: / 22.1.1997 / 19:12:44 / cg" |
228 "Created: / 22.1.1997 / 19:12:44 / cg" |
229 "Modified: / 28.4.1998 / 20:16:38 / ca" |
229 "Modified: / 28.4.1998 / 20:16:38 / ca" |
232 |
232 |
233 forLogicalNot:arg |
233 forLogicalNot:arg |
234 "return a new BlockValue computing the logical NOT of its arg |
234 "return a new BlockValue computing the logical NOT of its arg |
235 (which is usually another valueHolder)" |
235 (which is usually another valueHolder)" |
236 |
236 |
237 ^ (super new) |
237 ^ (self new) |
238 setBlock:[:a | a value not] |
238 setBlock:[:a | a value not] |
239 arguments:(Array with:arg) |
239 arguments:(Array with:arg) |
240 |
240 |
241 "Created: / 17.8.1998 / 10:06:41 / cg" |
241 "Created: / 17.8.1998 / 10:06:41 / cg" |
242 "Modified: / 30.1.2000 / 23:24:18 / cg" |
242 "Modified: / 30.1.2000 / 23:24:18 / cg" |
244 |
244 |
245 forLogicalOrAll:argArray |
245 forLogicalOrAll:argArray |
246 "return a new BlockValue computing the logical OR of all elements |
246 "return a new BlockValue computing the logical OR of all elements |
247 in the passed argArray (which are usually other valueHolders)" |
247 in the passed argArray (which are usually other valueHolders)" |
248 |
248 |
249 ^ (super new) |
249 ^ (self new) |
250 setBlock:[:arg | (arg findFirst:[:el | el value]) ~~ 0] |
250 setBlock:[:arg | (arg findFirst:[:el | el value]) ~~ 0] |
251 argumentArray:argArray asArray |
251 argumentArray:argArray asArray |
252 |
252 |
253 "Created: / 22.1.1997 / 19:13:01 / cg" |
253 "Created: / 22.1.1997 / 19:13:01 / cg" |
254 "Modified: / 28.4.1998 / 20:20:09 / ca" |
254 "Modified: / 28.4.1998 / 20:20:09 / ca" |
256 ! |
256 ! |
257 |
257 |
258 with:aBlock |
258 with:aBlock |
259 "return a new BlockValue computing aBlock" |
259 "return a new BlockValue computing aBlock" |
260 |
260 |
261 ^ (super new) setBlock:aBlock |
261 ^ (self new) setBlock:aBlock |
262 |
262 |
263 "Created: 16.12.1995 / 19:16:33 / cg" |
263 "Created: 16.12.1995 / 19:16:33 / cg" |
264 ! |
264 ! |
265 |
265 |
266 with:aBlock argument:anArgument |
266 with:aBlock argument:anArgument |
267 "return a new BlockValue computing aBlock" |
267 "return a new BlockValue computing aBlock" |
268 |
268 |
269 ^ (super new) |
269 ^ (self new) |
270 setBlock:aBlock |
270 setBlock:aBlock |
271 arguments:(Array with:anArgument) |
271 arguments:(Array with:anArgument) |
272 |
272 |
273 "Created: 16.12.1995 / 19:20:14 / cg" |
273 "Created: 16.12.1995 / 19:20:14 / cg" |
274 ! |
274 ! |
275 |
275 |
276 with:aBlock argument:anArgument1 argument:anArgument2 |
276 with:aBlock argument:anArgument1 argument:anArgument2 |
277 "return a new BlockValue computing aBlock" |
277 "return a new BlockValue computing aBlock" |
278 |
278 |
279 ^ (super new) |
279 ^ (self new) |
280 setBlock:aBlock |
280 setBlock:aBlock |
281 arguments:(Array with:anArgument1 with:anArgument2) |
281 arguments:(Array with:anArgument1 with:anArgument2) |
282 |
282 |
283 "Created: 16.12.1995 / 19:20:14 / cg" |
283 "Created: 16.12.1995 / 19:20:14 / cg" |
284 ! |
284 ! |
285 |
285 |
286 with:aBlock argument:anArgument1 argument:anArgument2 argument:anArgument3 |
286 with:aBlock argument:anArgument1 argument:anArgument2 argument:anArgument3 |
287 "return a new BlockValue computing aBlock" |
287 "return a new BlockValue computing aBlock" |
288 |
288 |
289 ^ (super new) |
289 ^ (self new) |
290 setBlock:aBlock |
290 setBlock:aBlock |
291 arguments:(Array with:anArgument1 with:anArgument2 with:anArgument3) |
291 arguments:(Array with:anArgument1 with:anArgument2 with:anArgument3) |
292 |
292 ! |
|
293 |
|
294 with:aBlock argument:anArgument1 argument:anArgument2 argument:anArgument3 argument:anArgument4 |
|
295 "return a new BlockValue computing aBlock" |
|
296 |
|
297 ^ (self new) |
|
298 setBlock:aBlock |
|
299 arguments:(Array with:anArgument1 with:anArgument2 with:anArgument3 with:anArgument4) |
293 ! |
300 ! |
294 |
301 |
295 with:aBlock arguments:aCollectionOfArguments |
302 with:aBlock arguments:aCollectionOfArguments |
296 "return a new BlockValue computing aBlock" |
303 "return a new BlockValue computing aBlock" |
297 |
304 |
298 ^ (super new) |
305 ^ (self new) |
299 setBlock:aBlock |
306 setBlock:aBlock |
300 arguments:aCollectionOfArguments |
307 arguments:aCollectionOfArguments |
301 |
308 |
302 "Created: 16.12.1995 / 19:20:14 / cg" |
309 "Created: 16.12.1995 / 19:20:14 / cg" |
303 ! ! |
310 ! ! |