Functional
filter
default Function15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, Function<T16, R>> curry15()
public interface Applicative<F extends K1, Mu extends Applicative.Mu> extends Functor<F, Mu>
functors
list.map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…)
flatmap
category theory
collection.filter(…).map(…).flatMap(…).filter(…).map(…).filter(…).forEach(…)
A monad is a monoid in the category of endofunctors.
μ
(+ 1 1)
flatmap
flatmap
flatmap
Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int
list.map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…).map(…)
filter
upgrades.flatMapIndexed { idx, entry -> entry.map { Pair(it.key.position.add(-2.0*idx, 0.0, 0.0), Pair(it.value, it.value.data)) } }
public interface Applicative<F extends K1, Mu extends Applicative.Mu> extends Functor<F, Mu>
map
μ
forall void a n m. MonadEffect n => MonadAff m => MonadEffect m => Plus m => m a -> n (Tuple (m a) (m void))
filter
map
map
(+ 1 1)
collection.filter(…).map(…).flatMap(…).filter(…).map(…).filter(…).forEach(…)
λ
functors
>>==
functors
filter
map
filter
flatmap
map
std::reduce(std::execution::seq, v.cbegin(), v.cend())
public interface Applicative<F extends K1, Mu extends Applicative.Mu> extends Functor<F, Mu>
Category Theory
() -> a -> b -> (c, d, e) -> f -> a(b)(c)[d](e, f)
reduce
filter
profunctors
category theory
filter
functors
public <A, B, C, D> FunctionType<App2<Grate.Mu<A2, B2>, A, B>, App2<Grate.Mu<A2, B2>, C, D>> dimap(final Function<C, A> g, final Function<B, D> h)
A monad is a monoid in the category of endofunctors.
Category Theory
A monad is a monoid in the category of endofunctors.