Java examples from HFDP book done in F#