def poreshatPoPonyatijam
(input
: String
=> String
)(p
: Ponyatia, answers
: Seq
[(Zagadka, String
)] = Nil
): Mast
= p
match { m
case z
@ Zagadka
(q, f
) => poreshatPoPonyatijam(input)(f(answer), answers :+ (z, answer))
}
val z2
= Zagadka
("Вилку в глаз или в жопу раз?",
_ match { Blatnoy
Petuh
})
val z1
= Zagadka
("Есть два стула, на одном пики точены, на другом хуи дрочены, на какой сядешь, на какой мать посадишь?",
_ match { case "Возьму пики точены, срублю хуи дрочены" => z2
Petuh
})
poreshatPoPonyatijam
(q
=> readLine
(s
"$q\n"))(z1
) match { println("Поди подмойся, Маня")
println("Успех")
}
}
c2VhbGVkIHRyYWl0IFBvbnlhdGlhCmNhc2UgY2xhc3MgWmFnYWRrYShxdWVzdGlvbjogU3RyaW5nLCBmOiBTdHJpbmcgPT4gUG9ueWF0aWEpIGV4dGVuZHMgUG9ueWF0aWEKCnRyYWl0IE1hc3QgZXh0ZW5kcyBQb255YXRpYQpjYXNlIG9iamVjdCBQZXR1aCBleHRlbmRzIE1hc3QKY2FzZSBvYmplY3QgQmxhdG5veSBleHRlbmRzIE1hc3QKCm9iamVjdCBNYWluIGV4dGVuZHMgQXBwIHsKCWRlZiBwb3Jlc2hhdFBvUG9ueWF0aWphbShpbnB1dDogU3RyaW5nID0+IFN0cmluZykocDogUG9ueWF0aWEsIGFuc3dlcnM6IFNlcVsoWmFnYWRrYSwgU3RyaW5nKV0gPSBOaWwpOiBNYXN0ID0gcCBtYXRjaCB7CgkJY2FzZSBtOiBNYXN0ID0+CgkJCW0KCQkJCgkJY2FzZSB6IEAgWmFnYWRrYShxLCBmKSA9PgoJCQl2YWwgYW5zd2VyID0gaW5wdXQocSkKCQkJcG9yZXNoYXRQb1BvbnlhdGlqYW0oaW5wdXQpKGYoYW5zd2VyKSwgYW5zd2VycyA6KyAoeiwgYW5zd2VyKSkKCX0KCgl2YWwgejIgPSBaYWdhZGthKCLQktC40LvQutGDINCyINCz0LvQsNC3INC40LvQuCDQ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