[Haskell-cafe] Very crazy
Andrew Coppin
andrewcoppin at btinternet.com
Tue Sep 25 05:48:34 EDT 2007
Dougal Stanton wrote:
> In this instance I would suggest:
>
> (1) Text.Printf
>
You've got to be kidding... I went to all the trouble of learning a
"scary logic programming language [sic]" just to avoid that damned
printf() function! :-/
> (2) Pull out some of those things into separate functions with
> where/let clauses.
>
> If it's a matrix you should probably have something like
>
>
>> showMatrix = concatMap showRow
>>
>
> Since you'll be applying the same procedures to each line of digits.
>
Well, actually more like
show_matrix = concat . zipWith show_row [1..]
but yeah, this would probably simplify things somewhat.
More information about the Haskell-Cafe
mailing list