Generalize the genInteractionListThatEndsAtTime concept

This commit is contained in:
Sven van Heugten 2026-01-05 21:32:14 +01:00
parent 9e97d9a37b
commit 14cfaaeed5
3 changed files with 24 additions and 20 deletions

View file

@ -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