Skip to content

Instantly share code, notes, and snippets.

@matteosister
Last active September 27, 2015 08:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matteosister/c7bc8774eadbfb2a86cd to your computer and use it in GitHub Desktop.
Save matteosister/c7bc8774eadbfb2a86cd to your computer and use it in GitHub Desktop.
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