Convert little imperative code to functional coding style

bearophile bearophileHUGS at lycos.com
Fri Aug 10 13:44:15 PDT 2012


Nathan M. Swan:

> Ugh! I guess functional isn't always the best ;)

There are many situations where I prefer simple procedural code 
over puzzle-style Haskell code that uses every operator of the 
Control.Arrow standard module :-)
But in this case the code is not too much hard to read.

Regarding Timon's code, Code Golfing is fun, but I suggest do do 
it only on sites like this:
http://codegolf.com/

Otherwise I suggest to add spaces around operators, after commas, 
etc.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list