So I was trying out the code from here and got error:
error: cannot convert value of type 'WritableKeyPath<_, _>' to expected argument type '(Bool) -> Bool'**
error: cannot infer key path type from context; consider explicitly specifying a root type
.filter(.self)
^
<#Root#>
My Playground
let (switch1, switch2, switch3, switch4) = (true, true, false, false)
let switches = [switch1, switch2, switch3, switch4]
let isOn = !switches
.lazy
.filter(\.self) // error here
.count
.isMultiple(of: 2)