gistlib
main.swift@ViewBuilder func applyIf<T: View>(_ condition: Bool, apply: (Self) -> T) -> some View { if condition { apply(self) } else { self } } 162 chars9 lines
@ViewBuilder func applyIf<T: View>(_ condition: Bool, apply: (Self) -> T) -> some View { if condition { apply(self) } else { self } }
gistlibby LogSnag