jeanparpaillon / elixir-curry

Lambda stuff for elixir

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ElixirLambda

Provides lambda programming stuffs for elixir

Curry functions

Defines:

defmodule Partial do
  @moduledoc false
  use Curry

  defc f(a, b, c, d, e) do
    %{a: a, b: b, c: c, d: d, e: e}
  end
end

Call:

f_a = Partial.f(1)
f_a_b = f_a(2)

%{a: 1, b: 2, c: 3, d: 4, e: 5} = f_a_b.(3).(4).(5)

Installation

If available in Hex, the package can be installed by adding elixir_lambda to your list of dependencies in mix.exs:

def deps do
  [
    {:elixir_lambda, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/elixir_lambda.

About

Lambda stuff for elixir


Languages

Language:Elixir 100.0%