every-bit-counts-0.1: A functional pearl on encoding and decoding using question-and-answer strategies

Games

Documentation

data Game whereSource

Constructors

Single :: ISO t () -> Game t 
Split :: ISO t (Either t1 t2) -> Game t1 -> Game t2 -> Game t 

data Bit Source

Constructors

O 
I 

Instances

dec :: Game t -> [Bit] -> (t, [Bit])Source

decOpt :: Game t -> [Bit] -> Maybe (t, [Bit])Source

decRandAux :: RandomGen g => g -> Game t -> tSource

decRand :: Int -> Game t -> tSource

(+>) :: Game t -> ISO s t -> Game sSource

enc :: Game t -> t -> [Bit]Source

testGame :: Game t -> t -> (t, [Bit])Source