Getting a feel for F# while trying to emplement ArithmetricEncoding