fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

8.8K
active users

#functionalprogramming

22 posts11 participants7 posts today

Using new Optics support in #higher-kinded-j is easy, just add a simple annotation to automatically generate Lenses, Prisms, and Isomorphisms then compose lenses for incredibly readable, deep updates:

// Create a "shortcut" lens by composing others
var userToStreetName = UserLenses.address()
.andThen(AddressLenses.street())
.andThen(StreetLenses.name());

// Perform the deep update in a single line
User updatedUser = userToStreetName.set("New Street", user);

You can perform effectful operations (failable, async, stateful). The library is also fully extensible, allowing you to define custom Traversal instances for any data structure.

Check out the docs, with loads of examples to get you started!
higher-kinded-j.github.io/

Higher-Kinded-J DocumentationAuditing Complex Data - The Power of Optics - Higher-Kinded Types and Optics for JavaExplore Higher-Kinded Types (HKTs) and Optcs in Java with the Higher-Kinded-J library. Learn about Functors, Applicatives, Monads, Transformers, practical functional patterns, and how to write cleaner, more composable Java code for your projects using Optics.

Power up your functional programming in Java! 🚀
The new Optics support in #higher-kinded-j is here, built directly on our powerful Higher-Kinded Types simulation. This brings a new level of abstraction and power to your code, not just cleaner data access.

Add a simple annotation, and get automatically generated Lenses, Prisms, Isomorphisms and Traversals.

🔧 Why it's a game-changer:

- Built on HKT: Unlocks powerful, abstract, and effectful operations.
- Zero-Boilerplate: Annotation-based generation of powerful tools.
- Extensible & Composable: A flexible foundation for your data manipulation needs.

Check out the docs, with loads of examples to get you started!
higher-kinded-j.github.io/

Higher-Kinded-J DocumentationAuditing Complex Data - The Power of Optics - Higher-Kinded Types and Optics for JavaExplore Higher-Kinded Types (HKTs) and Optcs in Java with the Higher-Kinded-J library. Learn about Functors, Applicatives, Monads, Transformers, practical functional patterns, and how to write cleaner, more composable Java code for your projects using Optics.