Skip to content

Conversation

@MikePuzanov
Copy link
Owner

No description provided.

Copy link

@DedSec256 DedSec256 left a comment

Choose a reason for hiding this comment

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

Есть некоторые замечания.

Comment on lines 56 to 57
| h :: tail when element % h = 0 -> false
| h :: tail when element % h <> 0 -> testOnPrime element tail

Choose a reason for hiding this comment

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

можно было бы записать как-то так

Suggested change
| h :: tail when element % h = 0 -> false
| h :: tail when element % h <> 0 -> testOnPrime element tail
| h :: tail ->
if element % h = 0 then false else testOnPrime element tail

но это не принципиально


[<Test>]
let countEvenNumbersCheck () =
let check x =

Choose a reason for hiding this comment

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

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


[<Test>]
let funcToTreeTest () =
let tree1 = Tree.Tree(2, Tree.Tip(4), Tree.Tip(6))

Choose a reason for hiding this comment

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

В тестовом дереве не хватает случаев, когда левое и правое поддерево непустые.


[<Test>]
let countTreeTest () =
let tree1 = TreeArithmetic.Node(Multiplication, Leaf 2, Node(Summation, Leaf 1, Leaf 1))

Choose a reason for hiding this comment

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

остальные функции тоже было бы неплохо протестировать.

Copy link

@DedSec256 DedSec256 left a comment

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.

3 participants