Get rid of an intermediate variable

This commit is contained in:
Sven van Heugten 2026-01-08 21:05:20 +01:00
parent 2c051c0b3d
commit 0ddcd17fd4

View file

@ -103,14 +103,10 @@ type NightLightTests() =
let ``After a new day starts, all lights that have power should be on as long as the 'Off' button isn't pressed`` let ``After a new day starts, all lights that have power should be on as long as the 'Off' button isn't pressed``
() ()
= =
let genInitialInteractionsListThatEndsWithTransitionToDay =
concatGens concatGens
[ genInitialInteractionsAndEndWith =<< genTimeChangedToNight [ genInitialInteractionsAndEndWith =<< genTimeChangedToNight
genInteractionsExcept isTimeChangedToDay genInteractionsExcept isTimeChangedToDay
genTimeChangedToDay |> Gen.map List.singleton ] genTimeChangedToDay |> Gen.map List.singleton
concatGens
[ genInitialInteractionsListThatEndsWithTransitionToDay
genInteractionsExcept ((=) (HumanInteraction RemotePressedOffButton)) ] genInteractionsExcept ((=) (HumanInteraction RemotePressedOffButton)) ]
|> Arb.fromGen |> Arb.fromGen
|> Prop.forAll |> Prop.forAll