Skip to content

Comments

Bracket seq#6

Open
Volodya-Petrov wants to merge 2 commits intomainfrom
bracket_sequence
Open

Bracket seq#6
Volodya-Petrov wants to merge 2 commits intomainfrom
bracket_sequence

Conversation

@Volodya-Petrov
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.

Есть небольшие замечания

open Program

[<Test>]
let testCorrectCase1 () =

Choose a reason for hiding this comment

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

не хватает теста на пустую строку

Comment on lines 17 to 18
if List.length stack = 0 || not (List.head stack = (closeBracketToOpen bracket)) then (false, 0)
else checkCorrectness seq (i + 1) (List.tail stack)

Choose a reason for hiding this comment

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

проще было бы сматчить stack с [] / head::tail

Comment on lines 21 to 22
let result, length = checkCorrectness seq 0 []
result && length = 0

Choose a reason for hiding this comment

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

Можно упростить так, чтобы возвращать просто checkCorrectness seq 0 []

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