Created
August 17, 2011 08:44
-
-
Save forki/1151108 to your computer and use it in GitHub Desktop.
Probabilities for drawing Ace of Clubs and Ace of Spaces
This file contains hidden or 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
// draw Ace of Clubs and Ace of Spaces in order | |
completeDeck | |
|> select 2 | |
|> filter ((=) [A,Clubs; A,Spades]) | |
|> probability | |
|> printfn "%A" // prints "1/2652" | |
// draw Ace of Clubs and Ace of Spaces in any order | |
completeDeck | |
|> select 2 | |
|> filterInAnyOrder [A,Clubs; A,Spades] | |
|> probability | |
|> printfn "A" // prints "1/1326" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment