{"id":20545580,"url":"https://github.com/eonist/binarysequencer","last_synced_at":"2026-07-02T23:02:40.874Z","repository":{"id":93635048,"uuid":"276860374","full_name":"eonist/BinarySequencer","owner":"eonist","description":"🧬 Sequence all possible combination of true and false","archived":false,"fork":false,"pushed_at":"2020-07-05T14:03:04.000Z","size":71,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-27T18:35:36.866Z","etag":null,"topics":["algorithm","array","binary","bit","boolean","recursive","recursive-algorithm"],"latest_commit_sha":null,"homepage":"","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/eonist.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":"2020-07-03T09:25:47.000Z","updated_at":"2025-02-21T11:50:04.000Z","dependencies_parsed_at":"2023-08-27T01:32:55.086Z","dependency_job_id":null,"html_url":"https://github.com/eonist/BinarySequencer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eonist/BinarySequencer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eonist%2FBinarySequencer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eonist%2FBinarySequencer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eonist%2FBinarySequencer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eonist%2FBinarySequencer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eonist","download_url":"https://codeload.github.com/eonist/BinarySequencer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eonist%2FBinarySequencer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35065702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"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":["algorithm","array","binary","bit","boolean","recursive","recursive-algorithm"],"created_at":"2024-11-16T01:52:42.190Z","updated_at":"2026-07-02T23:02:40.844Z","avatar_url":"https://github.com/eonist.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Example:\n```swift\nBinarySequencer.sequence(size: 4).forEach { print($0) }\n```\n\n## Output:\n```\n[true, true, true, true]\n[true, true, true, false]\n[true, true, false, true]\n[true, true, false, false]\n[true, false, true, true]\n[true, false, true, false]\n[true, false, false, true]\n[true, false, false, false]\n[false, true, true, true]\n[false, true, true, false]\n[false, true, false, true]\n[false, true, false, false]\n[false, false, true, true]\n[false, false, true, false]\n[false, false, false, true]\n[false, false, false, false]\n```\n\n### Resources:\n\n[https://github.com/almata/Combinatorics](https://github.com/almata/Combinatorics)\n\nfor all possible combinations of letters: [https://codereview.stackexchange.com/questions/52119/calculate-all-possible-combinations-of-an-array-of-arrays-or-strings](https://codereview.stackexchange.com/questions/52119/calculate-all-possible-combinations-of-an-array-of-arrays-or-strings)\n\n```\nfunction allPossibleCases(array, result, index) {\n    if (!result) {\n        result = [];\n        index = 0;\n        array = array.map(function(element) {\n            return element.push ? element : [element];\n        });\n    }\n    if (index \u003c array.length) {\n        array[index].forEach(function(element) {\n            var a = array.slice(0);\n            a.splice(index, 1, [element]);\n            allPossibleCases(a, result, index + 1);\n        });\n    } else {\n        result.push(array.join(' '));\n    }\n\n    return result;\n}\n\nvar t1 = [\"x\", \"y\", \"z\"];\nvar t2 = [[\"a\", \"b\"], \"c\", \"d\"];\nvar t3 = [[\"a\", \"b\"], [\"c\", \"d\"], \"e\"];\n\nconsole.log(allPossibleCases(t1)); // [\"x y z\"]\nconsole.log(allPossibleCases(t2)); // [\"a c d\", \"b c d\"]\nconsole.log(allPossibleCases(t3)); // [\"a c e\", \"a d e\", \"b c e\", \"b d e\"]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feonist%2Fbinarysequencer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feonist%2Fbinarysequencer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feonist%2Fbinarysequencer/lists"}