Collection Pipeline

Intent

Collection Pipeline introduces Function Composition and Collection Pipeline, two functional-style patterns that you can combine to iterate collections in your code. In functional programming, it's common to sequence complex operations through a series of smaller modular functions or operations. The series is called a composition of functions, or a function composition. When a collection of data flows through a function composition, it becomes a collection pipeline. Function Composition and Collection Pipeline are two design patterns frequently used in functional-style programming.


iluwatarFunctionalReactiveLess than 1 minute
Currying

Name / classification

Currying

Intent

Currying decomposes a function that takes multiple arguments into a sequence of functions that each take a single argument. Curried functions are useful since they can be used to create new functions with lower arity to perform more specialised tasks in a concise and readable manner. This is done via partial application.


iluwatarFunctionalDecouplingAbout 4 min
Filterer

Name / classification

Filterer

Intent

The intent of this design pattern is to introduce a functional interface that will add a functionality for container-like objects to easily return filtered versions of themselves.

Explanation

Real world example


iluwatarFunctionalExtensibilityAbout 3 min
Fluent Interface

Intent

A fluent interface provides an easy-readable, flowing interface, that often mimics a domain specific language. Using this pattern results in code that can be read nearly as human language.

Explanation

The Fluent Interface pattern is useful when you want to provide an easy readable, flowing API. Those interfaces tend to mimic domain specific languages, so they can nearly be read as human languages.


iluwatarFunctionalReactiveAbout 2 min
Monad

Intent

Monad pattern based on monad from linear algebra represents the way of chaining operations together step by step. Binding functions can be described as passing one's output to another's input basing on the 'same type' contract. Formally, monad consists of a type constructor M and two operations: bind - that takes monadic object and a function from plain object to monadic value and returns monadic value return - that takes plain type object and returns this object wrapped in a monadic value.


iluwatarFunctionalReactiveLess than 1 minute