Witchcraft v1.0.0-beta.2 Witchcraft.Semigroupoid.Proto protocol View Source

Protocol for the Elixir.Witchcraft.Semigroupoid type class

For this type class’s API, please refer to Elixir.Witchcraft.Semigroupoid

Link to this section Summary

Functions

Express how to apply a function to actual arguments, or “run the morphism”

Take some value and return it again

Link to this section Types

Link to this section Functions

Express how to apply a function to actual arguments, or “run the morphism”

Examples

iex> Witchcraft.Semigroupoid.apply(&inspect/1, [42])
"42"

Take some value and return it again

Examples

iex> times_ten_plus_one = compose(fn x -> x + 1 end, fn y -> y * 10 end)
...> times_ten_plus_one.(5)
51