My program from book RealWorldHaskell