What about putting array.empty in object.d?
Jacob Carlborg
doob at me.com
Wed Mar 21 14:30:17 PDT 2012
On 2012-03-21 21:49, Jonathan M Davis wrote:
> On Wednesday, March 21, 2012 10:17:08 Jacob Carlborg wrote:
>> http://www.ruby-doc.org/core-1.8.7/Enumerable.html#method-i-any-3F
>
> So, std.algorithm.canFind then? There has been some discussion of renaming it
> to any (or at least the overload that just takes the predicate and the range),
> but canFind gives you the behavior regardless.
>
> - Jonathan M Davis
Yes, I didn't see the overload. But the Ruby version has a default
predicate, that does this:
canFind!("a")([3, 4, 5]);
I'm usually using "any?" to check if an array contains any values.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list