The following will compare the first element's id with compr's id, and return true if matched. I am confused with {} of .first { } != nil syntax. How does the longer form of this pattern condense to to the following:
private(set) var arr : [Arrs] = []
func isPresent(for compr: Compr) -> Bool {
Arrs.first { comp.id == $0.id } != nil
}