type Food =
| Beer
| Bacon
| Apple
| Cherry
let (|NonFruit|Fruit|) =
function
| Beer | Bacon -> NonFruit
| Apple | Cherry -> Fruit
let fruitChecker = function | NonFruit -> "No" | Fruit -> "Yes"
[Beer;Bacon;Apple;Cherry] |> List.iter(fun x -> printfn "%s" (fruitChecker x))