API Reference WarmFuzzyThing v0.1.0
modules
Modules
Provides a way of working with already known Elixir constructs through monads.
The Either monad is a union between two general notions: Left and Right (the naming is inherited from Haskell and it depicts the idea: "Either I have this or I have that.").
This means that an Either monad can either be a Left or it can be a Right (think of it as a simple union between two types).
A Right is represented by the well known success type tuple {:ok, value} when value: any(),
where as a Left is represented by the well known error type tuple {:error, reason} when reason: any().
Generally a Right Either represents a successful transformation/operation where as a Left Either represents an unsuccessful one.
The Maybe monad is a union between two general notions: Just and Nothing (the naming is inherited from Haskell and it depicts the idea: "Maybe I have a value, maybe I don't.").
This means that a Maybe monad can either be a Just or it can be a Nothing (think of it as a simple union between two types).
A Just is represented by the well known success type tuple {:ok, value} when value: any(),
where as a Nothing is represented by nil, since it's the closest Elixir gets to representing "nothing".