Skip to content

Instantly share code, notes, and snippets.

@abetkin
Created November 30, 2017 16:39
Show Gist options
  • Save abetkin/1252413098876a761b0e864f5b599be3 to your computer and use it in GitHub Desktop.
Save abetkin/1252413098876a761b0e864f5b599be3 to your computer and use it in GitHub Desktop.
defmodule MixHi do
def hello do
data = %{kwa: "kush"}
ppln()
|> Enum.reduce(data, fn (x, acc) -> x.(acc) end)
end
def fa %{} = state do
{:hi, state}
end
def fb {:hi, %{kwa: rg}} do
rg
end
def ppln do
[&MixHi.fa/1, &MixHi.fb/1]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment