starts first second =
then False
then True
else False
add_plural word
| ends word "ch" = word ++ "es"
| ends word "x" = word ++ "es"
| ends word "s" = word ++ "es"
| ends word "o" = word ++ "es"
| ends word
"f" = (take (length word
-1) word
) ++ "ves" | ends word
"fe" = (take (length word
-2) word
) ++ "ves" | ends word
"y" = (take (length word
-1) word
) ++ "ies"
run_test 0 = do
run_test n = do
run_test (n-1)
main = do
c3RhcnRzIDo6IFN0cmluZyAtPiBTdHJpbmcgLT4gQm9vbAoKc3RhcnRzIGZpcnN0IHNlY29uZCA9IAoJaWYgbGVuZ3RoIHNlY29uZCA+IGxlbmd0aCBmaXJzdAoJdGhlbiBGYWxzZQoJZWxzZSBpZiAodGFrZSAobGVuZ3RoIHNlY29uZCkgZmlyc3QpID09IHNlY29uZAoJCXRoZW4gVHJ1ZQoJCWVsc2UgRmFsc2UKCmVuZHMgOjogU3RyaW5nIC0+IFN0cmluZyAtPiBCb29sCmVuZHMgZmlyc3Qgc2Vjb25kID0gc3RhcnRzIChyZXZlcnNlIGZpcnN0KSAocmV2ZXJzZSBzZWNvbmQpCgoKCmFkZF9wbHVyYWwgOjogU3RyaW5nIC0+IFN0cmluZwphZGRfcGx1cmFsIHdvcmQgCgl8IGVuZHMgd29yZCAiY2giIAk9IHdvcmQgKysgImVzIgoJfCBlbmRzIHdvcmQgIngiIAk9IHdvcmQgKysgImVzIgoJfCBlbmRzIHdvcmQgInMiIAk9IHdvcmQgKysgImVzIgoJfCBlbmRzIHdvcmQgIm8iIAk9IHdvcmQgKysgImVzIgoJfCBlbmRzIHdvcmQgImYiIAk9ICh0YWtlIChsZW5ndGggd29yZC0xKSB3b3JkKSArKyAidmVzIgoJfCBlbmRzIHdvcmQgImZlIiAJPSAodGFrZSAobGVuZ3RoIHdvcmQtMikgd29yZCkgKysgInZlcyIKCXwgZW5kcyB3b3JkICJ5IiAJPSAodGFrZSAobGVuZ3RoIHdvcmQtMSkgd29yZCkgKysgImllcyIKCXwgb3RoZXJ3aXNlIAkJPSB3b3J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