pub fn predicate<T, F>(f: F) -> PredicateSpecification<T, F>where F: Fn(&T) -> bool + Send + Sync,
Helper function to create a predicate specification