aboutsummaryrefslogtreecommitdiff
path: root/apps/util
diff options
context:
space:
mode:
Diffstat (limited to 'apps/util')
-rw-r--r--apps/util/lib/thulani/util.ex3
-rw-r--r--apps/util/lib/thulani/util/compose.ex4
-rw-r--r--apps/util/lib/thulani/util/curry.ex4
-rw-r--r--apps/util/mix.exs5
4 files changed, 14 insertions, 2 deletions
diff --git a/apps/util/lib/thulani/util.ex b/apps/util/lib/thulani/util.ex
index fad5e39..137b515 100644
--- a/apps/util/lib/thulani/util.ex
+++ b/apps/util/lib/thulani/util.ex
@@ -1,2 +1,5 @@
defmodule Thulani.Util do
+ @moduledoc """
+ Module for utility functions.
+ """
end
diff --git a/apps/util/lib/thulani/util/compose.ex b/apps/util/lib/thulani/util/compose.ex
index cd4435e..a5ee88c 100644
--- a/apps/util/lib/thulani/util/compose.ex
+++ b/apps/util/lib/thulani/util/compose.ex
@@ -1,4 +1,8 @@
defmodule Thulani.Util.Compose do
+ @moduledoc """
+ Implements infix function composition operator.
+ """
+
import Thulani.Util.Curry
def f <|> g, do: compose(f, g)
diff --git a/apps/util/lib/thulani/util/curry.ex b/apps/util/lib/thulani/util/curry.ex
index b03afab..b5aee88 100644
--- a/apps/util/lib/thulani/util/curry.ex
+++ b/apps/util/lib/thulani/util/curry.ex
@@ -1,5 +1,7 @@
defmodule Thulani.Util.Curry do
- @moduledoc false
+ @moduledoc """
+ Implements explicit currying.
+ """
def curry(f) do
{_, arity} = :erlang.fun_info(f, :arity)
diff --git a/apps/util/mix.exs b/apps/util/mix.exs
index a0caff9..ce9c72b 100644
--- a/apps/util/mix.exs
+++ b/apps/util/mix.exs
@@ -22,6 +22,9 @@ defmodule Thulani.Util.MixProject do
end
defp deps do
- []
+ [
+ {:dialyxir, "~>1.0.0-rc.7", only: [:dev], runtime: false},
+ {:credo, "~> 1.2", only: [:dev, :test], runtime: false}
+ ]
end
end