FunctionalRx
FunctionalRx is a collection of constructs to simplify a functional programming approach to Java and [STABLE]
Install / Use
/learn @pakoito/FunctionalRxREADME
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
Related Skills
node-connect
345.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
104.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
Security Score
Audited on May 9, 2020
