Skip to content

FunctionalRx is a collection of constructs to simplify a functional programming approach to Java and [STABLE]

License

Notifications You must be signed in to change notification settings

pakoito/FunctionalRx

Repository files navigation

FunctionalRx

FunctionalRx is a collection of constructs to simplify a functional programming approach to development on Java and Android.

For the RxJava 2.X version please go to FunctionalRx2.

Rationale

The base Java 7 framework does not contain most constructs to do even the simplest functional development. Given that functional programming is a paradigm that's not limited by languages, a series of libraries have been created to bridge some of the gap to others like Kotlin, Scala or Clojure.

FunctionalRx uses RxJava as a backend for their functions and helpers. It's meant to be used in combination with their rective streams.

Usage

An overview of the libraries can be read at Building a Functional Toolset on Android on my blog.

A thorough description and examples of each construct can be found in the readme of their repositories:

RxTuples - Simple tuples to use with RxJava

RxSealedUnions - Tagged Unions for the RxJava aesthete

RxComprehensions - Reduce boilerplate in RxJava by abstracting chained flatMaps, concatMaps and switchMaps

RxActions - Simple ActionN composition to use with RxJava

RxFunctions - Advanced Function composition to use with RxJava

RxCurrying - Simple currying for FuncN and ActionN on RxJava

RxPartialApplication - Simple partial application for FuncN and ActionN on RxJava

RxMemoization - Simple Function result caching for RxJava

Distribution

Each library can be added individually, or as a group by adding FunctionalRx.

Add as a dependency to your build.gradle

repositories {
    ...
    maven { url "https://jitpack.io" }
    ...
}
    
dependencies {
    ...
    compile 'com.github.pakoito:FunctionalRx:1.1.0'
    // FunctionalRx includes:
    //compile 'com.github.pakoito:RxTuples:1.0.0'
    //compile 'com.github.pakoito:RxSealedUnions:1.1.0'
    //compile 'com.github.pakoito:RxMemoization:1.1.0'
    //compile 'com.github.pakoito:RxPartialApplication:1.1.0'
    //compile 'com.github.pakoito:RxCurrying:1.1.0'
    //compile 'com.github.pakoito:RxFunctions:1.0.0'
    //compile 'com.github.pakoito:RxActions:1.0.0'
    //compile 'com.github.pakoito.RxComprehensions:rxcomprehensions:1.3.0'
    ...
}

or to your pom.xml

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependency>
    <groupId>com.github.pakoito</groupId>
    <artifactId>FunctionalRx</artifactId>
    <version>1.1.0</version>
</dependency>

License

Copyright (c) pakoito 2016

The Apache Software License, Version 2.0

See LICENSE.md

About

FunctionalRx is a collection of constructs to simplify a functional programming approach to Java and [STABLE]

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published