Packages

Happy path programming in elixir. Alternative to ok_jose, elixir's 1.2 `with` keyword and that kind of stuff.

Current section

18 Versions

Jump to

Compare versions

4 files changed
+5 additions
-5 deletions
  @@ -14,7 +14,7 @@ the alchemist's [happy path](https://en.wikipedia.org/wiki/Happy_path) with elix
14 14
15 15 ```elixir
16 16 def deps do
17 - [{:happy, "~> 1.2.0"}]
17 + [{:happy, "~> 1.2.2"}]
18 18 end
19 19 ```
20 20
  @@ -29,7 +29,7 @@ following goals in mind:
29 29
30 30 - The [happy path](https://en.wikipedia.org/wiki/Happy_path) must be immediately obvious to the eyes.
31 31 - Code should not be cluttered and should just work using the elixir you already know.
32 - - Avoid introducing noisy operators `~>>`, or counter-intuitive-arrow (to me at least) `pattern <- expr`
32 + - Avoid introducing noisy operators `~>>`, requiring commas after each pattern or the counter-intuitive-arrow (to me at least) `pattern <- expr`
33 33 - Should provide a way to recover when not so happy moments come.
34 34
35 35 ## Usage
  @@ -12,4 +12,4 @@
12 12 {<<"maintainers">>,[<<"Victor Hugo Borja <vborja@apache.org>">>]}.
13 13 {<<"name">>,<<"happy">>}.
14 14 {<<"requirements">>,[]}.
15 - {<<"version">>,<<"1.2.1">>}.
15 + {<<"version">>,<<"1.2.2">>}.
  @@ -130,7 +130,7 @@ defmodule Happy.HappyPath do
130 130 {{:=, [], [a, p]}, e}
131 131 end
132 132
133 - defp happy_match(no_pattern_match = {:=, _, [{x, [], y}, _]}) when is_atom(x) and is_atom(y) do
133 + defp happy_match(no_pattern_match = {:=, _, [{x, _, y}, _]}) when is_atom(x) and is_atom(y) do
134 134 {no_pattern_match}
135 135 end
  @@ -3,7 +3,7 @@ defmodule Happy.Mixfile do
3 3
4 4 def project do
5 5 [app: :happy,
6 - version: "1.2.1",
6 + version: "1.2.2",
7 7 elixir: "~> 1.0",
8 8 description: description,
9 9 package: package,