{"id":23651589,"url":"https://github.com/athanclark/almost-fix","last_synced_at":"2025-08-10T03:35:11.799Z","repository":{"id":35341780,"uuid":"39604035","full_name":"athanclark/almost-fix","owner":"athanclark","description":"Combinators for predicative recursion","archived":false,"fork":false,"pushed_at":"2015-07-24T06:48:21.000Z","size":116,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-20T01:14:07.129Z","etag":null,"topics":["fixpoint","haskell","predicates"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/athanclark.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}},"created_at":"2015-07-24T01:28:47.000Z","updated_at":"2018-11-27T20:58:38.000Z","dependencies_parsed_at":"2022-08-27T06:11:29.867Z","dependency_job_id":null,"html_url":"https://github.com/athanclark/almost-fix","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/athanclark/almost-fix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Falmost-fix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Falmost-fix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Falmost-fix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Falmost-fix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/athanclark","download_url":"https://codeload.github.com/athanclark/almost-fix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Falmost-fix/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269672060,"owners_count":24457112,"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-10T02:00:08.965Z","response_time":71,"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":["fixpoint","haskell","predicates"],"created_at":"2024-12-28T16:38:32.843Z","updated_at":"2025-08-10T03:35:11.777Z","avatar_url":"https://github.com/athanclark.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"almost-fix\n==========\n\nCombinators for predicative recursion\n\n## Usage\n\n### Simple Predicative Recursion\n\nSay you want to perform `f` until some boolean test `b`:\n\n```haskell\nalmostFix b f\n```\n\nwill run `f` until `b` returns `False`.\n\n```haskell\nalmostFix True f  ~  f . f . f ...\n```\n\n### Monadic Predicates\n\nSay you've got a _monadic_ step `f :: a -\u003e m a`, and some boolean test in the\nmonad `b :: m Bool` - a good example of this would be in a `MonadState Integer m`\nstateful monad, and the monadic predicate `liftM (\u003c 5) get :: m Bool`. Now, we\n_bind_ until the predicate is falsified:\n\n```haskell\nexclaimAgain :: MonadState Integer m =\u003e String -\u003e m String\nexclaimAgain a = do modify (+1)\n                    return (a ++ \"!\")\n\nexclaimFive :: String -\u003e String\nexclaimFive s = evalState (almostFix (liftM (\u003c= 5) get) exclaimAgain s) 1\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathanclark%2Falmost-fix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fathanclark%2Falmost-fix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathanclark%2Falmost-fix/lists"}