Skip to content

Instantly share code, notes, and snippets.

@matteosister

matteosister/infix_use.ex

Last active Sep 27, 2015
Embed
What would you like to do?
defmodule TestInfix do
import InfixFC
def invert(what) do
what |> String.graphemes |> Enum.reverse |> Enum.join
end
def inverted_and_stripped_upcase(subject) do
func = (&invert/1) <|> (&String.upcase/1) <|> (&String.strip/1)
func.(subject)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment