Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Алексей Золотыx, домашнее задание №2 #20

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

zolotyh
Copy link

@zolotyh zolotyh commented Jan 3, 2024

No description provided.

@zolotyh zolotyh changed the title Task 2 Алексей Золотыx, домашнее задание №2 Jan 6, 2024
(defn is-pangram [test-string])
(defn is-pangram [test-string]

(= alphabet
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вот тут опасно сравнивать со строкой. дело в том что множества это не упорядоченные коллекции и в зависимости от используемой хэш функции можно получить разный порядок элементов. множества всегда безопасней сравнивать с другими множествами

(cond
(= (rem n 3) 0) "Fizz"
(= (rem n 5) 0) "Buzz"
:else "FizzBuzz")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не верно указана ветка :else
например
(fizz-buzz 4)
=> "FizzBuzz"
хотя должно быть 4. FizzBuzz возвращаем только если кратно 5 и 3 одновременно

(recur 1 (inc j) matrix))
matrix)))

(defn common-child-length [first-string second-string]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

очень элегантное решение 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants