https://github.com/tomasbasham/gonads
Go module implementing well-known monads
https://github.com/tomasbasham/gonads
golang monads
Last synced: 9 months ago
JSON representation
Go module implementing well-known monads
- Host: GitHub
- URL: https://github.com/tomasbasham/gonads
- Owner: tomasbasham
- License: mit
- Created: 2023-06-11T19:15:28.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-01T00:03:54.000Z (over 2 years ago)
- Last Synced: 2025-01-02T10:12:14.895Z (about 1 year ago)
- Topics: golang, monads
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# gonads 
In [functional
programming](https://en.wikipedia.org/wiki/Functional_programming) a monad is
a structure that encapsulates a function, and its return value(s), in a type
providing more deterministic computational behaviours, and mitigating
side-effects. Mondas may be used to reduce boilerplate code needed for common
operations, such as dealing with optional or undefined values safely.
This module implements some well-known monadic structures that can be used in
Go programs to introduce functional paradigms.
## Prerequisites
You will need the following things properly installed on your computer.
- [Go](https://golang.org/): any one of the **three latest major**
[releases](https://golang.org/doc/devel/release.html)
## Installation
With [Go module](https://github.com/golang/go/wiki/Modules) support (Go 1.11+),
simply add the following import
```go
import "github.com/tomasbasham/gonads"
```
to your code, and then `go [build|run|test]` will automatically fetch the
necessary dependencies.
Otherwise, to install the `gonads` module, run the following command:
```bash
$ go get -u github.com/tomasbasham/gonads
```
## License
This project is licensed under the [MIT License](LICENSE.md).