-
Notifications
You must be signed in to change notification settings - Fork 0
Testattempt4 #63
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
base: master
Are you sure you want to change the base?
Testattempt4 #63
Conversation
| let mutable queue = new Queue<string>() | ||
|
|
||
| [<SetUp>] | ||
| let Setup () = queue <- new Queue<string>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вообще, это обычные функции, в F# они пишутся со строчной
| queue.Enqueue "1" | ||
| queue.Enqueue "2" | ||
| Assert.AreEqual("1", queue.Dequeue()) | ||
| Assert.AreEqual("2", queue.Dequeue()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FsUbit же, зачем Assert.AreEqual
| ///Добавить в элемент | ||
| member this.Enqueue (value : 'a) = | ||
| let reversed = List.rev list | ||
| list <- List.rev (value :: reversed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ну, так можно, но можно было просто сконкатенировать в хвост. Работало бы вдвое быстрее :)
yurii-litvinov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good enough, зачтена
No description provided.