{"repo":"samber/mo","free":true,"listed":false,"github":"https://github.com/samber/mo","clone":"git clone https://github.com/samber/mo.git","description":"🦄 Monads and popular FP abstractions, powered by Go 1.18+ Generics (Option, Result, Either...)","language":"Go","stars":3397,"topics":["cats","either","fp","functional","future","generics","go","golang","io","maybe"],"license":"MIT","category":"workflow-automation","readme_excerpt":"mo - Monads 🦄 samber/mo brings monads and popular FP abstractions to Go projects. samber/mo uses the recent Go 1.18+ Generics. Inspired by: - Scala - Rust - FP-TS See also: - samber/ro: Reactive Programming for Go: declarative and composable API for event-driven applications - samber/lo: A Lodash-style Go library based on Go 1.18+ Generics - samber/do: A dependency injection toolkit based on Go 1.18+ Generics - samber/cc-skills-golang: AI Agent Skills for Golang ---- 💖 Sponsored by: DBOS - Durable workflow orchestration library for Go ---- Why this name? I love short name for such utility library. This name is similar to \"Monad Go\" and no Go package uses this name. 💡 Features We currently support the following data types: - Option[T] (Maybe) - Result[T] - Either[A, B] - EitherX[T1, ..., TX] (With X between 3 and 5) - Future[T] - IO[T] - IOEither[T] - Task[T] - TaskEither[T] - State[S, A] 🚀 Install This library is v1 and follows SemVer strictly. No breaking changes will be made to exported APIs before v2.0.0. This library has no dependencies except the Go std lib. 💡 Quick start You can import mo using: Quick example using the option sub-package Pipe3 to compose transformations: Then use one of the helpers below: More examples in documentation. Tips for lazy developers I cannot recommend it, but in case you are too lazy for repeating mo. everywhere, you can import the entire library into the namespace. I take no responsibility on this junk. 😁 💩 🤠 Documentation and examp","default_branch":null,"files":null,"tree":[],"storefront":"/r/samber","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/samber/mo/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}