14 ms·
Not disagreeing with anything that you're saying, except that dictionaries are declared `[Key: Value]` and not `[Key, Value]`. By the way, rather than using `.
by timjver 10y ago
Not disagreeing with anything that you're saying, except that dictionaries are declared `[Key: Value]` and not `[Key, Value]`.
By the way, rather than using `.filter { ... }.first`, you should really use `.first(where: { ... })` instead. `filter` will iterate the entire sequence, while `first(where:)` stops after it finds a match.
- dep_b 10y agoAll true! Let me fix it. I remember the "where" approach not completely working like I expected it, didn't dare to put it in without checking :)