Last active
September 11, 2015 19:35
-
-
Save Hajto/956e2d4258363ea628d3 to your computer and use it in GitHub Desktop.
Andrzej's task
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 Andrzej do | |
def getData(s), do: String.replace(IO.gets(s),"\n","") | |
def gIndex(list,elem), do: Enum.find_index(list, fn x -> x == elem end) | |
def testCombinator (listS) do | |
x = [" pierwsza forma "," druga forma "," trzecia forma ", " polski "] | |
listP = List.zip([x,listS]) | |
Enum.map(listS, fn a -> Enum.map(listP, | |
fn {b,c} -> | |
unless gIndex(listS,a) == gIndex(x,b) do | |
getData(a <> "=>" <> b) == c | |
end | |
end) | |
end) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment