Skip to main content
Callback

Intent

Callback is a piece of executable code that is passed as an argument to other code, which is expected to call back (execute) the argument at some convenient time.

Also known as

  • Event-Subscription
  • Listener

Explanation

Real world example


iluwatarAbout 2 minFunctionalAsynchronousDecouplingIdiomReactive
Collection Pipeline

Intent

The Collection Pipeline design pattern is intended to process collections of data by chaining together operations in a sequence where the output of one operation is the input for the next. It promotes a declarative approach to handling collections, focusing on what should be done rather than how.


iluwatarAbout 3 minFunctionalReactiveData processing
Combinator

Also known as

  • Function Composition
  • Functional Combinator

Intent

The Combinator pattern is intended to enable complex functionalities by combining simple functions into more complex ones. It aims to achieve modularization and reusability by breaking down a task into simpler, interchangeable components that can be composed in various ways.


iluwatarAbout 3 minFunctionalIdiomReactive
Currying

Also known as

  • Partial Function Application

Intent

Currying decomposes a function that takes multiple arguments into a sequence of functions that each take a single argument. It helps in creating a higher-order function by partial application of its arguments.


iluwatarAbout 4 minFunctionalFunctional decomposition
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.


iluwatarAbout 2 minFunctionalReactive