Predicate example in Swift

This is ready to be pasted into a playground!