Skip to content

Conversation

Vadzimz
Copy link

@Vadzimz Vadzimz commented Mar 10, 2024

No description provided.

Comment on lines +55 to +61
(defn find-node
"находим на текущем уровне ноду по ключу и перемещаем туда зиппер "
[key-node loc]
(->> loc
(iterate zip/right)
(drop-while #(not= (first (zip/node %)) key-node))
first))
Copy link
Contributor

Choose a reason for hiding this comment

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

Интересная реализация обхода с помощью iterate!

Comment on lines +86 to +88
(if (= a "ls") (fill-empty-dir loc stream)
(if (= b "..") (zip/up loc)
(find-node b loc)))))
Copy link
Contributor

Choose a reason for hiding this comment

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

Кажется, что тут лучше бы case смотрелся, чем вложенные условия.

@astynax
Copy link
Contributor

astynax commented Mar 11, 2024

За дз №21 ставлю зачёт!

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