mo - Monads is a functional programming utility library for Go that introduces monads and related abstractions using modern Go generics. The project brings well-known FP constructs such as Option, Result, Either, Future, IO, and Task into the Go ecosystem to help developers write safer and more composable code. By leveraging generics introduced in Go 1.18+, the library provides strong type safety without relying on reflection or code generation. It is particularly useful for managing nullable values, error propagation, asynchronous workflows, and functional pipelines in a predictable way. The design draws inspiration from languages like Scala, Rust, and TypeScript FP libraries, making it familiar to developers with functional backgrounds. Overall, samber/mo enables a more declarative and expressive programming style in Go while remaining lightweight and dependency-free.

Features

  • Option Result and Either monads
  • Future and Task abstractions
  • IO and State functional utilities
  • Type-safe generics-based API
  • Functional composition helpers
  • No external dependencies

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow mo - Monads

mo - Monads Web Site

Other Useful Business Software
Full-stack observability with actually useful AI | Grafana Cloud Icon
Full-stack observability with actually useful AI | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of mo - Monads!

Additional Project Details

Programming Language

Go

Related Categories

Go Libraries

Registered

2026-02-20