Skip to content

Conversation

@bygu4
Copy link
Owner

@bygu4 bygu4 commented Apr 10, 2025

No description provided.

Copy link

@yurii-litvinov yurii-litvinov left a comment

Choose a reason for hiding this comment

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

Всё так, да

/// Definition of a binary tree.
type Tree<'a> =
| None
| Tip of 'a * Tree<'a> * Tree<'a>

Choose a reason for hiding this comment

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

Tip по-английски означает "кончик", в презентации, где речь ша про деревья, использовался в значении "лист". Правильнее было бы Node или что-то такое

match x with
| x when x % 2 = 0 -> -1
| _ -> 1
)

Choose a reason for hiding this comment

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

Неэлегантно :) Это всё можно было через Seq.unfold в одну строчку сделать

@bygu4 bygu4 merged commit f78fb56 into main Aug 2, 2025
4 checks passed
@bygu4 bygu4 deleted the test branch August 2, 2025 21:34
@bygu4 bygu4 restored the test branch August 2, 2025 21:34
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