{"id":17981519,"url":"https://github.com/francisrstokes/lazy-do","last_synced_at":"2025-04-04T01:22:57.656Z","repository":{"id":92073758,"uuid":"162737872","full_name":"francisrstokes/lazy-do","owner":"francisrstokes","description":"Fantasy Land compliant do notation for lazy structures 🦄","archived":false,"fork":false,"pushed_at":"2018-12-21T21:38:31.000Z","size":12,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T13:11:12.230Z","etag":null,"topics":["do-notation","fantasy-land","javascript","monad"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/francisrstokes.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":"2018-12-21T16:53:41.000Z","updated_at":"2023-11-20T04:51:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"46024291-b6a4-4f58-b42f-bad2a88875ce","html_url":"https://github.com/francisrstokes/lazy-do","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francisrstokes%2Flazy-do","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francisrstokes%2Flazy-do/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francisrstokes%2Flazy-do/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francisrstokes%2Flazy-do/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/francisrstokes","download_url":"https://codeload.github.com/francisrstokes/lazy-do/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247104232,"owners_count":20884190,"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","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":["do-notation","fantasy-land","javascript","monad"],"created_at":"2024-10-29T18:10:38.855Z","updated_at":"2025-04-04T01:22:57.632Z","avatar_url":"https://github.com/francisrstokes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# (Lazy) Do notation\n\n\u003cimg src=\"logo.png\" width=\"200\" height=\"200\" /\u003e\n\nThis package provides a generator based, Fantasy Land (v3) compliant do notation for lazy monadic structures.\n\n## Installation\n\n```bash\nnpm i lazy-do\n```\n\n## Usage\n\n```javascript\n// Do :: Monad m =\u003e (() -\u003e Iterator) -\u003e m\nconst Do = require('lazy-do');\n```\n\n## Example\n\nThe following example uses the [Fluture](https://github.com/fluture-js/Fluture) library as the monad, but it can be any lazily evaluated monadic structure.\n\n```javascript\nconst Do = require('lazy-do');\nconst Future = require('fluture');\n\nconst someFuture = Do (function* () {\n  const a = yield Future.after(1000, 41);\n  const b = yield Future.after(500, 1);\n  return Future.of(`The answer is ${a + b}!`);\n}, Future);\n\nsomeFuture.fork(\n  console.error,\n  console.log\n);\n// -\u003e The answer is 42!\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrancisrstokes%2Flazy-do","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrancisrstokes%2Flazy-do","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrancisrstokes%2Flazy-do/lists"}