{"id":40836492,"url":"https://github.com/denisdubochevalier/monad","last_synced_at":"2026-01-21T22:38:39.466Z","repository":{"id":186393115,"uuid":"675104445","full_name":"denisdubochevalier/monad","owner":"denisdubochevalier","description":"Implementation of monads in go with generics","archived":false,"fork":false,"pushed_at":"2023-09-13T00:24:48.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-01-26T09:33:13.802Z","etag":null,"topics":["functional-programming","monad","monads"],"latest_commit_sha":null,"homepage":"","language":"Go","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/denisdubochevalier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null}},"created_at":"2023-08-05T19:42:20.000Z","updated_at":"2023-09-13T07:47:20.000Z","dependencies_parsed_at":"2023-10-11T08:59:45.783Z","dependency_job_id":null,"html_url":"https://github.com/denisdubochevalier/monad","commit_stats":{"total_commits":61,"total_committers":2,"mean_commits":30.5,"dds":"0.14754098360655743","last_synced_commit":"ead3219d5e895b36232bba23fccc6eee01136344"},"previous_names":["denisdubochevalier/monad"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/denisdubochevalier/monad","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisdubochevalier%2Fmonad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisdubochevalier%2Fmonad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisdubochevalier%2Fmonad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisdubochevalier%2Fmonad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denisdubochevalier","download_url":"https://codeload.github.com/denisdubochevalier/monad/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisdubochevalier%2Fmonad/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28645551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T21:29:11.980Z","status":"ssl_error","status_checked_at":"2026-01-21T21:24:31.872Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["functional-programming","monad","monads"],"created_at":"2026-01-21T22:38:38.854Z","updated_at":"2026-01-21T22:38:39.460Z","avatar_url":"https://github.com/denisdubochevalier.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# monad\n\n![GitHub go.mod Go version (subdirectory of monorepo)](https://img.shields.io/github/go-mod/go-version/denisdubochevalier/monad)\n[![GoDoc](https://godoc.org/github.com/denisdubochevalier/monad?status.svg)](https://pkg.go.dev/github.com/denisdubochevalier/monad)\n![Build Status](https://github.com/denisdubochevalier/monad/actions/workflows/go.yml/badge.svg)\n![Lint Status](https://github.com/denisdubochevalier/monad/actions/workflows/golangci-lint.yml/badge.svg)\n[![Go report](https://goreportcard.com/badge/github.com/denisdubochevalier/monad)](https://goreportcard.com/report/github.com/denisdubochevalier/monad)\n[![Coverage](https://img.shields.io/codecov/c/github/denisdubochevalier/monad)](https://codecov.io/gh/denisdubochevalier/monad)\n[![License](https://img.shields.io/github/license/denisdubochevalier/monad)](./LICENSE)\n\n## Introduction\n\nAn expansive Go library that encapsulates a plethora of monadic concepts,\nrigorously adhering to the three foundational monadic laws. Designed for both\npedagogical exploration and industrial-strength functional programming, this\npackage serves as a bedrock for complex, side-effect-free computations.\n\n\u003e Note: While the package has matured substantially, it remains a dynamic\n\u003e project. Use cautiously in mission-critical applications.\n\n## Features\n\n- Comprehensive suite of monads including but not limited to `Maybe`, `Either`,\n  `Result`, `Identity`, `List`, `Reader`, `Writer`, `State`, and more.\n- Functionally pure methods like `FlatMap`, `Map`, and other combinators for\n  side-effect management.\n- Developed with idiomatic Go patterns, optimizing for both readability and\n  performance.\n- Extensive test coverage to ensure adherence to monadic laws.\n\n## What's Next\n\nThe current version of this monadic library serves as a foundational layer upon\nwhich more advanced functionalities can be built. The roadmap ahead is exciting\nand aims to elevate this project from a basic utility to a comprehensive toolkit\nfor functional programming in Go.\n\n## Proper Examples for Each Monad\n\n- **In-Situ Examples**: Each monad will be accompanied by in-situ examples to\n  elucidate its practical applications.\n\n- `example_test.go`: The examples will be implemented as `_test.go` files,\n  serving dual roles as instructive code snippets and as integration tests.\n\n## New Monads\n\n- **Additional Monads**: Expanding the library's repertoire to include other\n  essential monads like the following:\n  - [ ] RWS (Reader-Writer-State) Monad\n  - [ ] Promise Monad\n  - [ ] Try Monad\n  - [ ] Logic Monad\n  - [ ] Event Monad\n  - [ ] Transaction Monad\n  - [ ] Parser Combinators as Monads\n  - [ ] Probabilistic Monad\n  - [ ] Co-Routine Monad\n  - [ ] Lens Monad\n  - [ ] Process Monad\n- **Community Contributions**: We are open to contributions for implementing\n  monads that are currently not part of the library but would offer significant\n  value.\n\n## Monad Composition and Monad Transformers\n\n- **Composition**: Introducing methods to compose multiple monads into new, more\n  powerful constructs.\n- **Transformers**: Implementing monad transformers that enable more complex\n  operations by stacking multiple monads.\n- **Real-world Scenarios**: Accompanying the above with examples and\n  documentation that demonstrate these advanced concepts in action, showing how\n  they solve real-world problems.\n\n## Installation\n\nDue to the heavy use of on-the-edge generics, `monad` requires go version \u003e\n1.21.0\n\n```bash\ngo get github.com/denisdubochevalier/monad\n```\n\n## Usage\n\nEach monad comes with detailed documentation and example code. Please refer to\nthe GoDoc for individual guides.\n\n```go\nimport \"github.com/denisdubochevalier/monad\"\n\n// Example usage with Maybe monad\nmaybe := monad.Just(42)\nresult := maybe.FlatMap(func(x int) monad.Maybe {\n  return monad.Just(x * 2)\n})\n```\n\n## Contributing\n\nContributions are warmly welcomed. Please refer to the\n[CONTRIBUTING.md](/CONTRIBUTING.md) file for guidelines.\n\n## License\n\nThis project is licensed under the terms of the MIT license. See\n[LICENSE](/LICENSE) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenisdubochevalier%2Fmonad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenisdubochevalier%2Fmonad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenisdubochevalier%2Fmonad/lists"}