Apemb
Chain - An easy way to chain functions that return ok/error tuples
Hello all,
I have been using Elixir for a bit of time, and each time I wrote code like this I wondered if there were not a better way than chain with functions.
So I created Chain https://github.com/Apemb/chain
What do you think ?
Do you see it as useful ?
Most Liked
NobbZ
Additionally to @kokolegorille s list:
3
kokolegorille
With witchcraft, it would look like this…
data
>>> load_shift_aggregate/1
>>> verify_shift_can_be_edited/1
>>> create_update_command/1
>>> update_shift_aggregate/1
>>> save_updated_shift_aggregate/1
>>> load_updated_shift_entity/1
>>> return_shift_entity/1
But there are more operators… https://github.com/witchcrafters/witchcraft#operators
2
kokolegorille
Hello and bienvenue…
You don’t like to use with?
There is also witchcraft, which might have a similar purpose.
1
kokolegorille
There is also ok library, by @Crowdhailer
1
ondrej-tucek
Maybe I’m wrong, but isn’t the catching thrown error anti-pattern?:
- Avoid using exceptions for control-flow
- Avoid working with invalid data
Also you can use the result library, for example this a way.
1
Popular in Libraries
Hi everyone,
We would like to announce that Plataformatec is working on a new MySQL driver called MyXQL. Our goal is to eventually integ...
New
Earmark is a pure-Elixir Markdown converter.
It is intended to be used as a library (just call Earmark.as_html), but can also be used as...
New
After just over two years in development, this latest version of Pigeon is what I finally consider done in regards to my original vision ...
New
Hey all,
We have made an Ecto3 Adapter for SQLite3, ecto_sqlite3!
We have successfully on-boarded the full suite of integration tests (...
New
parameterized pipe in elixir: |n>
edit: negative index in |n> and mixed usage with |> are supported
example:
use ParamP...
New
I created a new library GitHub - benvp/ex_cva: Class Variance Authority for Elixir which aims to make it very easy to define different va...
New
Hey everyone
i’ve developed a library for Jalaali calendar for elixir which supports converting Gregorian dates to Jalaali and vice vers...
New
Yes, yet another parser combinator library!
Most of the parser combinators in the ecosystem are either compile-time, often using AST tra...
New
PhoenixWS - Websockets over Phoenix Channels
Source code on Github here: https://github.com/tmbb/phoenix_ws
Phoenix channels are a great...
New
Here is my first stab at this. README pasted below.
https://github.com/Hal9000/elixir_random
Comments and critiques are welcome.
Th...
New
Other popular topics
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!)
This post collects co...
New
I have followed this StackOverflow post to install the specific version of Erlang.
And When I am running mix ecto.setup then getting fol...
New
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
Hi,
I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
Hi,
I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New







