Quark v1.0.1 Quark
For convenience, many of the most common combinators are available here and given firendlier names.
Due to performance reasons, many of the combinators are given non-combinatory
implementations (ie: not everything is expressed in terms s and k)
Summary
Functions
See Quark.Compose.<|>/2.
See Quark.SKI.k/2.
See Quark.SKI.k/2.
See Quark.BCKW.c/1.
See Quark.SKI.i/1.
Apply a function to itself
iex> import Quark, only: [m: 1]
iex> add_one = fn x -> x + 1 end
iex> add_two = m(add_one)
iex> add_two.(8)
10
Opposite of first (the k combinator).
Returns the second of two arguments. Can be used to repeatedly apply the same value in functions such as folds.
iex> Quark.second(43, 42)
42
iex> Enum.reduce([1,2,3], [], &Quark.second/2)
[]
See Quark.m/0.
See Quark.m/1.