Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cristalhq/ternary
Ternary logic for Go.
https://github.com/cristalhq/ternary
dependency-free go golang logic ternary
Last synced: about 5 hours ago
JSON representation
Ternary logic for Go.
- Host: GitHub
- URL: https://github.com/cristalhq/ternary
- Owner: cristalhq
- License: mit
- Created: 2019-04-20T08:15:14.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-31T09:54:30.000Z (over 3 years ago)
- Last Synced: 2024-06-20T05:55:28.628Z (5 months ago)
- Topics: dependency-free, go, golang, logic, ternary
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ternary
[![build-img]][build-url]
[![pkg-img]][pkg-url]
[![reportcard-img]][reportcard-url]
[![coverage-img]][coverage-url]Ternary logic for Go.
## Install
```
go get github.com/cristalhq/ternary
```## Example
```go
a, b, c := ternary.False, ternary.Unknown, ternary.True
ternary.Not(a)
ternary.Imp(a, b)
ternary.ImpL(a, c)
ternary.MA(b)
```## Documentation
See [these docs][pkg-url].
## License
[MIT License](LICENSE).
[build-img]: https://github.com/cristalhq/ternary/workflows/build/badge.svg
[build-url]: https://github.com/cristalhq/ternary/actions
[pkg-img]: https://pkg.go.dev/badge/cristalhq/ternary
[pkg-url]: https://pkg.go.dev/github.com/cristalhq/ternary
[reportcard-img]: https://goreportcard.com/badge/cristalhq/ternary
[reportcard-url]: https://goreportcard.com/report/cristalhq/ternary
[coverage-img]: https://codecov.io/gh/cristalhq/ternary/branch/master/graph/badge.svg
[coverage-url]: https://codecov.io/gh/cristalhq/ternary