import Foundation
extension RandomNumberGenerator {
func randomBool() -> Bool {
return random() > 0.5 // Binary operator '>' cannot be applied to operands of type 'Int' and 'Double'
}
}
Yeah, go ahead and file on Feedback Assistant and it'll get to the right place.
I think the specific issue is that this chapter has an example protocol that predates the standard library's RandomNumberGenerator protocol, so there's a name conflict. Earlier in the chapter, it defines: