Last active
March 12, 2019 20:07
-
-
Save jasondown/f53bec90461414929d24662409e70ef3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// <--- 2nd parameter was (sample : SampleData) | |
let canMakeSample (robot : Robot) (sample : DiagnosedSampleData) = | |
sample.Molecules.Counts | |
|> Map.forall (fun mt count -> robot.Molecules.Counts.[mt] >= count) | |
// <--- 2nd parameter was (sample : SampleData) | |
let getRequiredMolecule (robot : Robot) (sample : DiagnosedSampleData) = | |
let ms = | |
sample.Molecules.Counts | |
|> Map.filter (fun mt count -> robot.Molecules.Counts.[mt] < count) | |
|> Seq.head | |
ms.Key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment