samber/mo
🦄 Monads and popular FP abstractions, powered by Go 1.18+ Generics (Option, Result, Either...) observed · 2026-08-28
Health v2 · maintenance only
90/100
- Activity 99
- Release rhythm 74
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 59.5
- age_days: 1569
- days_rel: 92
- days_push: 9
- n_releases_24m: 5
Adoption not part of the score
3403 stars · 118 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
samber/mo is a Go library providing monads and functional programming abstractions such as Option, Result, Either, Future, IO, Task, and State, built on Go 1.18+ generics. It enables type-safe, composable error handling and functional pipelines with no dependencies beyond the Go standard library.
Use cases
- handle optional values without nil checks in Go
- model errors as values with Result types in Go
- use Either types for error handling in Go
- compose functional pipelines with map and flatMap in Go
- represent async computations with Future and Task in Go
- avoid nil pointer errors using Option/Maybe types
- write functional-style code in Go with generics
When to choose
- you want Rust/Scala-style Option and Result semantics in Go
- your team prefers explicit, type-safe error handling over error tuples
- you need composable transformations for optional or fallible values
- you want a dependency-free, SemVer-stable FP library
When to avoid
- your codebase follows idiomatic Go error-return conventions and the team is unfamiliar with FP
- you need full monad transformer stacks or advanced FP features not provided here
- you are on Go versions older than 1.18 without generics support
Facets
library · maturity stable
error-handling concurrency developer-tools developer-tools programming-languages go cross-platform monads functional-programming generics option-type result-type either task future state-monad algorithms
9 sources
- readme: https://github.com/samber/mo · fetched 2026-08-28 · a5a7c2630cb7
- homepage: https://pkg.go.dev/github.com/samber/mo · fetched 2026-08-29 · 8b1286f6fcb2
- site_page: https://pkg.go.dev/about · fetched 2026-08-29 · 757852027879
- site_page: https://pkg.go.dev/github.com/samber/mo/option · fetched 2026-08-29 · cf3027c8e558
- site_page: https://pkg.go.dev/github.com/samber/mo/result · fetched 2026-08-29 · 6aff70e3d64e
- site_page: https://pkg.go.dev/github.com/samber/mo/either · fetched 2026-08-29 · edf6d3711f3e
- site_page: https://pkg.go.dev/github.com/samber/mo/either3 · fetched 2026-08-29 · 9ae34c39462d
- site_page: https://pkg.go.dev/github.com/samber/mo/either4 · fetched 2026-08-29 · 895031df8eee
- site_page: https://pkg.go.dev/github.com/samber/mo/either5 · fetched 2026-08-29 · c7f82112f91b
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| samber/mo | main | 90 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem