Monocle is a pure functional, optics library for Scala providing immutable data access and transformation tools — including Lens, Prism, Iso, Optional, and Traversal. It enables composable, declarative modifications of deeply nested immutable structures in a concise and type-safe fashion.
Features
- Core optics: Lens, Prism, Iso, Optional, Traversal
- Safe, immutable access/modification without boilerplate
- Composable optics chains using composeLens, composeTraversal
- Integration with Cats, Cats Effect, and typeclass-based workflows
- Support for Scala 2 and 3, and multiple data structures (case classes, ADTs)
- Compatible with Scala.js and Scala Native
Categories
LibrariesLicense
MIT LicenseFollow Monocle
You Might Also Like
Gen AI apps are built with MongoDB Atlas
MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of Monocle!