# View Source Quark.BCKW(Quark v2.3.3-doma)

The classic BCKW combinators. A similar idea to `SKI`, but with different primitives.

# Link to this section Summary

## Functions

Normal (binary) function composition

Reverse (first) two arguments (`flip`). Aliased as `flip`.

Apply the same argument to a functon twice

# Link to this section Functions

Link to this function

# b()

View Source

Normal (binary) function composition

## examples Examples

``````iex> sum_plus_one = b(&(&1 + 1), &Enum.sum/1)
iex> [1,2,3] |> sum_plus_one.()
7``````
Link to this function

# b(x)

View Source
Link to this function

# b(x, y)

View Source
Link to this function

# b(x, y, z)

View Source
`@spec b((... -> any()), (... -> any()), any()) :: any()`
Link to this function

# c()

View Source

Reverse (first) two arguments (`flip`). Aliased as `flip`.

## examples Examples

``````iex> c(&div/2).(1, 2)
2

iex> reverse_concat = c(&Enum.concat/2)
...> reverse_concat.([1,2,3], [4,5,6])
[4,5,6,1,2,3]

iex> flip(&div/2).(1, 2)
2``````
Link to this function

# c(fun)

View Source
`@spec c((... -> any())) :: (... -> any())`
Link to this function

# flip(fun)

View Source
Link to this function

# k()

View Source
Link to this function

# k(a)

View Source
Link to this function

# k(a, b)

View Source
Link to this function

# w()

View Source

Apply the same argument to a functon twice

## examples Examples

``````iex> repeat = w(&Enum.concat/2)
iex> repeat.([1,2])
[1,2,1,2]

iex> w(&Enum.zip/2).([1,2,3])
[{1, 1}, {2, 2}, {3, 3}]``````
Link to this function

# w(fun)

View Source
`@spec w((... -> any())) :: any()`