Created
August 7, 2021 02:56
-
-
Save adamnemecek/786fb7a6620e032655b2c98f300d473e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct User : Equatable { | |
let id: UInt | |
let selected: Bool | |
} | |
var z = (0...10).map { User(id: $0, selected: $0 == 3 || $0 == 6 || $0 == 10) } | |
var q = (0...10).map { User(id: $0, selected: $0 == 3 || $0 == 6 || $0 == 10) } | |
z.gather(at: 0) { $0.selected } | |
z.gather(at: 5) { $0.selected } | |
q.gather(at: 5) { $0.selected } | |
print(z == q) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment