Хабр Курсы для всех
РЕКЛАМА
Большая витрина: от крупнейших школ до частных авторов. Сравнивайте по цене, длительности, формату и выбирайте самый подходящий курс!
[<TestFixture>]
type ``A game of bowling`` ()=
[<Test>] member x.
``with simple scores should get the expected score.`` ()=
scoreBowls [1;2;3] |> should equal 6
[<Test>] member x.
``with a spare should get the expected score (spare).`` ()=
scoreBowls [2;8;1] |> should equal 12
[<Test>] member x.
``with a strike should get the expected score (strike).`` ()=
scoreBowls [10;1;2] |> should equal 16
[<Test>] member x.
``that is perfect should get a score of 300.`` ()=
scoreBowls [for i in 1..18 -> 10] |> should equal 300
Введение в F#, или полезное о бесполезном