CastCollect.castswhere(str, function) and tests

passing a function as the second argument to CastCollection.castswhere tests
each member cast with the function