How do I do the following?
I have several types. Each of the types have two properties in common.
type OpsFlag = Key: FlagKey Project: Project Metadata: FlagMetadata option type TimeBasedFlag = Key: FlagKey Project: Project Metadata: FlagMetadata option type Flag = | OpsFlag of OpsFlag | TimeBasedFlag of TimeBasedFlag flags // Flag list |> List.filter (fun f -> f.Project = project)
How do i now filter a list by a property “project” that all types in “Flag” have in common? I understand inheritance from a base class with these properties is not really an option.
Thank you in advance. Let me know if you need more information.