[Haskell-beginners] Translating imperative algorithms to Haskell

Stephen Tetley stephen.tetley at gmail.com
Fri Feb 19 18:06:57 EST 2010


Hello all

Particularly concerning the negascout algorithm, there doesn't seem to
be much in the algorithm presented on Wikipedia that couldn't be done
purely functionally with a fairly equivalent line count (might need a
auxiliary tree type and a tree fold). The 'imperativeness' in this
case only seems to be assignment to accumulators.

The version on Hackage doesn't seem to define an actual tree data type
only a tree-like type class, which while making things general does
appear to make things complicated.

Best wishes

Stephen


More information about the Beginners mailing list