Watched Point Free Issue #52 Enum Properties
Watched Point Free Issue #52 Enum Properties. As usual, absolutely crazy stuff!
Side note. Operator for promoting a key path into a function to make possible let admins = userts.filter(^\.isAdmin)
:
prefix operator ^
prefix func ^ <Root, Value>(_ keyPath: KeyPath<Root, Value>) -> (Root) -> Value {
return { root in root[keyPath: keyPath] }
}