[Haskell-cafe] Translating an imperative algorithm - negascout
Colin Paul Adams
colin at colina.demon.co.uk
Fri Feb 27 03:58:23 EST 2009
>>>>> "Toby" == Toby Hutton <toby.hutton at gmail.com> writes:
Toby> But I don't want to try and refactor the code you've
Toby> provided without some tests to ensure everything is correct.
Toby> Rule number one for refactoring. :)
A very good reminder.
I'll write some simple (data, that is) test cases - I intend to
package it as a small library anyway - with type classes so I can
plug-in different search algorithms, and it's time I got to grips with
HUnit and QuickCheck.
Anton> It's worth keeping in mind the lesson of the lambda
Anton> calculus: that a local variable is just a
Anton> function in disguise.
I'd never thought about that before.
Thanks to both of you for your suggestions. Most helpful.
--
Colin Adams
Preston Lancashire
More information about the Haskell-Cafe
mailing list