View Source ExAequo.Fn (ExAequo v0.6.8)

Functional helpers

Summary

Functions

Ignoring args, returning a const

A functional wrapper for nil

iex(9)> tagged_fn(:alpha).("beta")
{:alpha, "beta"}

Functions

Ignoring args, returning a const

iex(1)> const_fn(1).()
1

iex(2)> const_fn(2, 1)
2

iex(3)> const_fn(:a, 1, 2)
:a

iex(4)> const_fn(nil, 1, :a, [])
nil
Link to this function

const_fn(const, _, _, _)

View Source

A functional wrapper for nil

iex(5)> nil_fn()
nil

iex(6)> nil_fn(42)
nil

iex(7)> nil_fn({:a, :b}, "hello")
nil

iex(8)> nil_fn([], "hello", %{})
nil
iex(9)> tagged_fn(:alpha).("beta")
{:alpha, "beta"}