{"id":19688470,"url":"https://github.com/mickamy/distinctuntilchangedbugexample","last_synced_at":"2025-10-28T22:33:40.297Z","repository":{"id":114506180,"uuid":"218758107","full_name":"mickamy/DistinctUntilChangedBugExample","owner":"mickamy","description":null,"archived":false,"fork":false,"pushed_at":"2019-10-31T12:40:02.000Z","size":314,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T09:57:23.610Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mickamy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-31T12:13:24.000Z","updated_at":"2019-10-31T12:40:03.000Z","dependencies_parsed_at":"2023-06-11T07:15:51.154Z","dependency_job_id":null,"html_url":"https://github.com/mickamy/DistinctUntilChangedBugExample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mickamy/DistinctUntilChangedBugExample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mickamy%2FDistinctUntilChangedBugExample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mickamy%2FDistinctUntilChangedBugExample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mickamy%2FDistinctUntilChangedBugExample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mickamy%2FDistinctUntilChangedBugExample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mickamy","download_url":"https://codeload.github.com/mickamy/DistinctUntilChangedBugExample/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mickamy%2FDistinctUntilChangedBugExample/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268675680,"owners_count":24288324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T18:38:03.412Z","updated_at":"2025-10-28T22:33:40.235Z","avatar_url":"https://github.com/mickamy.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DistinctUntilChangedBugExample\n\n`Observable\u003c(Bool, Bool)\u003e.distinctUntilChanged` behaives unexpectedly.\n\n```Swift\nObservable\u003c(Bool, Bool)\u003e\n    .of(\n      (false, false),\n      (true, false),\n      (false, true),\n      (true, true)\n    )\n    .distinctUntilChanged { $0 == $1 }\n    .subscribe(onNext: { print(\"onNext: \\($0)\") })\n    .disposed(by: bag)\n```\n\nI expected the following output,\n\n```\nonNext: (false, false)\nonNext: (true, false)\nonNext: (false, true)\nonNext: (true, true)\n```\n\nbut actually the result is like below\n\n```\nonNext: (false, false)\nonNext: (true, false)\nonNext: (true, true)\n```\n\n---\n\nI though it might be a bug belongs to `Swift` language, but it's not.\n\n```Swift\nprint((false, false) == (true, false)) // false\nprint((false, false) == (true, false)) // false\nprint((false, false) == (true, false)) // false\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmickamy%2Fdistinctuntilchangedbugexample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmickamy%2Fdistinctuntilchangedbugexample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmickamy%2Fdistinctuntilchangedbugexample/lists"}