From 7340a998a117b58efd7c4d39c3dc659f026d240b Mon Sep 17 00:00:00 2001 From: Alex Gorelov Date: Thu, 15 Mar 2018 17:12:03 +0300 Subject: [PATCH] Update 10_runtime_polymorphism.clj --- src/koans/10_runtime_polymorphism.clj | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/koans/10_runtime_polymorphism.clj b/src/koans/10_runtime_polymorphism.clj index 8be1c6a..16d9989 100644 --- a/src/koans/10_runtime_polymorphism.clj +++ b/src/koans/10_runtime_polymorphism.clj @@ -15,28 +15,28 @@ (defmethod diet :default [a] __) (meditations - "Some functions can be used in different ways - with no arguments" + "Полиморфизм. Без аргументов." (= __ (hello)) - "With one argument" + "Один аргумент" (= __ (hello "world")) - "Or with many arguments" + "Тысячи их" (= __ (hello "Peter" "Paul" "Mary")) - "Multimethods allow more complex dispatching" + "Мультиметоды и диспетчеризация. Всё просто." (= "Bambi eats veggies." (diet {:species "deer" :name "Bambi" :age 1 :eater :herbivore})) - "Animals have different names" + "Имена разные" (= "Thumper eats veggies." (diet {:species "rabbit" :name "Thumper" :age 1 :eater :herbivore})) - "Different methods are used depending on the dispatch function result" + "Разные методы исходя из вывода" (= "Simba eats animals." (diet {:species "lion" :name "Simba" :age 1 :eater :carnivore})) - "You may use a default method when no others match" + "Традиционно, есть и метод по-умолчанию" (= "I don't know what Rich Hickey eats." (diet {:name "Rich Hickey"})))