Last active
September 27, 2015 08:26
-
-
Save matteosister/c7bc8774eadbfb2a86cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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