I hereby claim:
- I am jcelliott on github.
- I am jelliott (https://keybase.io/jelliott) on keybase.
- I have a public key ASBLWJywrax6mgI8RZlPvHnBaJ97YJdvRAFOFq1tv0Fcogo
To claim this, I am signing this object:
defmodule Mix.Tasks.Deps.Info do | |
use Mix.Task | |
@moduledoc """ | |
Prints information for every dependency from Hex | |
""" | |
def run(_args) do | |
Mix.Project.get! | |
Mix.Dep.loaded([env: :prod]) |
package main | |
import ( | |
"log" | |
"net/http" | |
"net/http/httputil" | |
"net/url" | |
) | |
func main() { |
I hereby claim:
To claim this, I am signing this object:
defmodule Flatten do | |
@doc """ | |
Flattens a list by recursively flattening the head and tail of the list | |
""" | |
def flatten([head | tail]), do: flatten(head) ++ flatten(tail) | |
def flatten([]), do: [] | |
def flatten(element), do: [element] | |
end |
defmodule Railway do | |
@moduledoc """ | |
Railway implements the ideas from this blog post: https://zohaib.me/railway-programming-pattern-in-elixir/ | |
It is essentially an implementation of the 'Either' monad constrained to the Elixir :ok/:error | |
result tuple convention. It can replace many straightforward uses of a 'with' statement. | |
Use it like this: | |
``` | |
import Railway | |
value |