Generalize the genInteractionListThatEndsAtTime concept
This commit is contained in:
parent
9e97d9a37b
commit
14cfaaeed5
3 changed files with 24 additions and 20 deletions
|
|
@ -8,18 +8,18 @@ let private isDay (time: DateTime) =
|
|||
time.TimeOfDay >= TimeSpan.FromHours 5.5
|
||||
&& time.TimeOfDay < TimeSpan.FromHours 20.5
|
||||
|
||||
type ArbitraryInteractionsListThatEndsDuringTheDay =
|
||||
type ArbitraryInteractionListThatEndsDuringTheDay =
|
||||
static member InteractionsList() =
|
||||
ArbMap.defaults
|
||||
|> ArbMap.generate<DateTime>
|
||||
|> Gen.filter isDay
|
||||
|> Gen.bind genInteractionsListThatEndsAtTime
|
||||
|> Gen.bind genInteractionListThatEndsAtTime
|
||||
|> Arb.fromGen
|
||||
|
||||
type ArbitraryInteractionsListThatEndsDuringTheNight =
|
||||
type ArbitraryInteractionListThatEndsDuringTheNight =
|
||||
static member InteractionsList() =
|
||||
ArbMap.defaults
|
||||
|> ArbMap.generate<DateTime>
|
||||
|> Gen.filter (not << isDay)
|
||||
|> Gen.bind genInteractionsListThatEndsAtTime
|
||||
|> Gen.bind genInteractionListThatEndsAtTime
|
||||
|> Arb.fromGen
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue