| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Poker.Range
Description
A range of Hole cards.
Synopsis
- data Freq = Freq !Int !Int
- newtype Range a b = Range {}
- rangeFromList :: Ord a => [(a, b)] -> Range a b
- getDecisionFreqRange :: Foldable f => (b -> Bool) -> Range a (f b) -> Range a Freq
- holdingRangeToShapedRange :: Monoid v => Range Hole v -> Range ShapedHole v
- addHoleToShapedRange :: Num a => a -> Hole -> Range ShapedHole a -> Range ShapedHole a
Documentation
A frequency is an unevaluated ratio that indicates how often a decision was made. For example, the value Freq (12, 34) indicates that out of the 34 people who faced this decision, 12 chose to make this decision.
A simple wrapper around a Map that uses different instances
for Semigroup. Range's Semigroup instance combines values at the same keys with <>
(unlike the Map Semigroup instance from containers).
Instances
| (Eq a, Eq b) => Eq (Range a b) Source # | |
| (Ord a, Read a, Read b) => Read (Range a b) Source # | |
| (Show a, Show b) => Show (Range a b) Source # | |
| (Ord a, Monoid b) => Semigroup (Range a b) Source # |
|
| (Ord a, Monoid b) => Monoid (Range a b) Source # |
|
| (Pretty a, Pretty b) => Pretty (Range a b) Source # | |
Defined in Poker.Range | |
rangeFromList :: Ord a => [(a, b)] -> Range a b Source #
Make a Range form a list.
holdingRangeToShapedRange :: Monoid v => Range Hole v -> Range ShapedHole v Source #
Convert from a Range of hole cards to a Range of ShapedHole.
addHoleToShapedRange :: Num a => a -> Hole -> Range ShapedHole a -> Range ShapedHole a Source #
Add a singleton Hole hand to a Range of ShapedHole.