Module dmx.fun


module dmx.fun
Functional programming constructions for Java.

Provides the core monadic types:

  • Option — represents an optional value
  • Result — represents a value or an error
  • Either — neutral disjoint union of two value types
  • Try — represents a computation that may throw
  • Validated — error-accumulating validation type
  • CheckedSupplier — supplier that may throw checked exceptions
  • CheckedRunnable — runnable that may throw checked exceptions
  • CheckedFunction — function that may throw checked exceptions
  • CheckedConsumer — consumer that may throw checked exceptions
  • Tuple2 — an immutable pair of two values
  • Tuple3 — immutable triple of three values
  • Tuple4 — immutable quadruple of four values
  • TriFunction — function accepting three arguments
  • QuadFunction — function accepting four arguments
  • Lazy — lazily evaluated, memoized value
  • NonEmptyList — list guaranteed to contain at least one element
  • NonEmptyMap — map guaranteed to contain at least one entry
  • NonEmptySet — set guaranteed to contain at least one element
  • Guard — composable predicate blocks for Validated pipelines
  • Resource — composable managed resource with guaranteed release
  • Accumulator — value paired with a side-channel accumulation (Writer monad)

The entire module is @NullMarked: all API types are non-null by default.

  • Packages

    Exports
    Package
    Description