Functional & Reactive
for Core Java.
A nano lib of focused, battle-tested primitives โ Result<T>, checked functions, async pipelines,
tuples, pattern matching and memoization โ all sitting on top of plain Java 8+.
<dependency>
<groupId>com.svenruppert</groupId>
<artifactId>functional-reactive</artifactId>
<version>06.01.01</version>
</dependency>What's inside
Small, composable building blocks that play nicely with the JDK you already have.
Result<T>
A Success/Failure type with map, flatMap, thenCombine and ifPresentOrElse. Optional, but for errors.
Read more โChecked Functions
Functional interfaces that can throw โ and lift cleanly into Result.
Read more โCompletableFutureQueue
Define async pipelines as ordered transformations on top of CompletableFuture.
Read more โTuples (PairโฆSept)
Type-safe N-ary tuples with proper equals/hashCode โ drop-in for ad-hoc grouping.
Read more โPattern Matching
Case for declarative branching โ no fall-through, no boilerplate.
Read more โMemoizer
Cache the result of any pure function, mono- bi- or tri-arity.
Read more โDesigned for production
- โ In production use for over a decade.
- โ Zero runtime dependencies beyond the JDK.
- โ JDK 8 baseline, optional
module-info.javafor JDK 9+. - โ Licensed under EUPL 1.2 โ friendly to commercial use.
Result<User> user = repository.findById(id);
String greeting = user
.map(User::getName)
.map(name -> "Hello, " + name)
.orElse("Hello, stranger");Functional Java done right
Workshops, architecture reviews and pair-programming for teams adopting functional patterns on the JVM.
Learn more โSupport continued maintenance
functional-reactive is open source. Sponsoring keeps releases predictable and roadmaps public.
Become a sponsor โ