{"id":32114194,"url":"https://github.com/nodef/extra-boolean.elm","last_synced_at":"2026-02-21T19:33:51.146Z","repository":{"id":53543310,"uuid":"330811684","full_name":"nodef/extra-boolean.elm","owner":"nodef","description":"Boolean data type has two possible truth values to represent logic.","archived":false,"fork":false,"pushed_at":"2025-04-10T20:05:31.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-14T05:34:34.415Z","etag":null,"topics":["algebra","boolean","eqv","extra","imp","is","logic","parse","xor"],"latest_commit_sha":null,"homepage":"https://package.elm-lang.org/packages/elmw/extra-boolean/latest/","language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nodef.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-01-18T23:31:05.000Z","updated_at":"2025-04-10T20:05:35.000Z","dependencies_parsed_at":"2025-10-20T15:23:30.239Z","dependency_job_id":"09f926a9-2433-4cce-8265-fdf9f96b25aa","html_url":"https://github.com/nodef/extra-boolean.elm","commit_stats":null,"previous_names":["nodef/extra-boolean.elm","elmw/extra-boolean"],"tags_count":21,"template":false,"template_full_name":"nodef/hello-world.elm","purl":"pkg:github/nodef/extra-boolean.elm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-boolean.elm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-boolean.elm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-boolean.elm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-boolean.elm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodef","download_url":"https://codeload.github.com/nodef/extra-boolean.elm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-boolean.elm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29691045,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T18:18:25.093Z","status":"ssl_error","status_checked_at":"2026-02-21T18:18:22.435Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["algebra","boolean","eqv","extra","imp","is","logic","parse","xor"],"created_at":"2025-10-20T15:12:50.738Z","updated_at":"2026-02-21T19:33:51.141Z","avatar_url":"https://github.com/nodef.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"Boolean data type has two possible truth values to represent logic.\u003cbr\u003e\n:package: [Package](https://package.elm-lang.org/packages/elmw/extra-boolean/latest/),\n:blue_book: [Wiki](https://github.com/elmw/extra-boolean/wiki).\n\nHere is my implementation of digital logic gates in software. That includes\nthe basic gates [not], [and], [or], [xor]; their complements [nand], [nor],\n[xnor]; and 2 propositional logic (taught in discrete mathematics) gates\n[imply], [eq]; and their complements [nimply], [neq]. There is also a\nmultiplexer, called [select], and a `true` counter, called [count]. [count]\ncan help you make custom gates, such as an *alternate* concept of **xnor**\nwhich returns `true` only if all inputs are the same (standard [xnor] returns\n`true` if even inputs are `true`). All of them can handle upto 8 inputs.\n\n[parse] is influenced by [\"boolean\"] package, and is quite good at translating\n`string` to `boolean`. It can also handle double negatives, eg. `not inactive`.\nYou know the [and] of 2-inputs, but what of 1-input? What of 0? And what of\nthe other gates? I answer them here.\n\n\u003e Stability: Experimental.\n\n\u003cbr\u003e\n\n```elm\nimport Boolean exposing (..)\n\nparse \"1\"\nparse \"truthy\"\nparse \"not off\"\n-- True\n\nparse \"not true\"\nparse \"inactive\"\nparse \"disabled\"\n-- False\n\nimply True False\n-- False\n\neq False False\n-- True\n\nxor3 True True True\n-- True\n\nselect3 1 True False True\n-- False         ^\n\ncount3 True True False\n-- 2    ^    ^\n```\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n\n## Index\n\n| Function | Action                                 |\n| -------- | -------------------------------------- |\n| [parse]  | Converts string to boolean.            |\n| [not]    | Checks if value is false.              |\n| [and]    | Checks if all values are true.         |\n| [or]     | Checks if any value is true.           |\n| [xor]    | Checks if odd no. of values are true.  |\n| [nand]   | Checks if any value is false.          |\n| [nor]    | Checks if all values are false.        |\n| [xnor]   | Checks if even no. of values are true. |\n| [eq]     | Checks if antecedent ⇔ consequent.     |\n| [neq]    | Checks if antecedent ⇎ consequent.     |\n| [imply]  | Checks if antecedent ⇒ consequent.     |\n| [nimply] | Checks if antecedent ⇏ consequent.     |\n| [select] | Checks if ith value is true.           |\n| [count]  | Counts no. of true values.             |\n\n[\"boolean\"]: https://www.npmjs.com/package/boolean\n[parse]: https://github.com/elmw/extra-boolean/wiki/parse\n[not]: https://github.com/elmw/extra-boolean/wiki/not\n[and]: https://github.com/elmw/extra-boolean/wiki/and\n[or]: https://github.com/elmw/extra-boolean/wiki/or\n[xor]: https://github.com/elmw/extra-boolean/wiki/xor\n[nand]: https://github.com/elmw/extra-boolean/wiki/nand\n[nor]: https://github.com/elmw/extra-boolean/wiki/nor\n[xnor]: https://github.com/elmw/extra-boolean/wiki/xnor\n[eq]: https://github.com/elmw/extra-boolean/wiki/eq\n[neq]: https://github.com/elmw/extra-boolean/wiki/neq\n[imply]: https://github.com/elmw/extra-boolean/wiki/imply\n[nimply]: https://github.com/elmw/extra-boolean/wiki/nimply\n[select]: https://github.com/elmw/extra-boolean/wiki/select\n[count]: https://github.com/elmw/extra-boolean/wiki/count\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n[![](https://img.youtube.com/vi/6mMK6iSZsAs/maxresdefault.jpg)](https://www.youtube.com/watch?v=6mMK6iSZsAs)\n![](https://ga-beacon.deno.dev/G-RC63DPBH3P:SH3Eq-NoQ9mwgYeHWxu7cw/github.com/nodef/extra-boolean.elm)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodef%2Fextra-boolean.elm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodef%2Fextra-boolean.elm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodef%2Fextra-boolean.elm/lists"}