Talk:Filter
I fail to see where the "alternate" C# tests for evenness... Sgeier 23:43, 30 January 2007 (EST)
- Looks like the confusion stems from whether or not the "select even numbers" portion of the task description is required. I'll change the wording and remove the alternate C# example. --Short Circuit 10:28, 31 January 2007 (EST)
Objective-C code
Does it really works?! It does not on GNUstep, and looking at Apple's doc, I doubt it works for Mac OS X. NSPredicate does not cite the possibility of writing directly selectors-like string for NSExpression that way (Cocoa predicates); NSExpression has the expressionForFunction:arguments: where expressionForFunction can be @"modulus:by:" (and arguments is a NSArray) (see here), but again, I've found no example about, nor citing, the fact that one can directly write a predicateWithFormat string expressing expressionForFunction directly with that syntax you've used, i.e. @"modulus:by:(SELF, 2)". Instead, I've tried a simpler @"intValue < 4" and it works like expected (the selector IntValue is for NSNumber object into the array...). GNUstep quirks or Cocoa facts? --ShinTakezou 18:16, 22 February 2009 (UTC)