jeffsonstein ("Jeff Sonstein") wrote:
reading about https://dlang.org/phobos/std_algorithm_searching.html#canFind
works like this:
// is 2 in the array [ 0, 1, 2, 3 ]?
writeln( canFind( [0, 1, 2, 3], 2 ) ); // returns true to writelnwhich I think may be really useful in implementing the Activity Vocabulary Core Types from “4. Model” here https://www.w3.org/TR/activitystreams-core/ as honest-to-Moloch extendable OOP-style programmable objects 🎺, which seems to have been the way the spec writers were thinking about things.