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
Go From Idea to Deployed AI App Fast Icon
Go From Idea to Deployed AI App Fast

One platform to build, fine-tune, and deploy. No MLOps team required.

Access Gemini 3 and 200+ models. Build chatbots, agents, or custom models with built-in monitoring and scaling.
Try Free
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

7 days ago