What are the best library options for Functional Programming in Java?

This page summarizes the projects mentioned and recommended in the original post on /r/learnjava

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • Kategory

    Λrrow - Functional companion to Kotlin's Standard Library (by arrow-kt)

  • I am wondering what the functional programming ecosystem looks like for Java. I am an experienced Haskell programmer, so I am not looking to learn the fundamentals of FP, I am just looking for the easiest way to get certain things like an Either type, a Maybe type, Monoids, optics would be nice but not essential, and so on. I checked out the Functional Programming in Java and Modern Java in Action books and it looks to me (but I may have just missed mentions of libraries) that they lean into teaching FP ideas from first principles, whereas I'm not trying to learn the ideas, I am just looking for a good library. What I'm looking for basically is the Kotlin Arrow library; if I was working in Kotlin I would just use that and be happy. Obviously interoperability between Kotlin and Java exists though, so would just importing Arrow and using it from Java be a pragmatic solution or would it cause a lot of annoyances? The code I'm writing is not going to be used for anything, so incurring Kotlin as a dependency (at least I think that's how it works, right?) is not an issue. I am just looking for a good library to use. Thank you.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts