Neil Mitchell wrote:
Hi

And people complain that *Perl* is bad? This function is quite obviously
absurd. I mean, it works, but can *you* figure out what it does without
running it?

No. Can you say what the intention of this code is? Maybe a few
examples? The type signature? That way I think people will be more
able to give you hints.

Type signature is

 show_system :: [[Double]] -> String

It takes a matrix representing a system of equations, and pretty prints it. Unfortunately, doing complex formatting like that is... well, complex. The input is quite simple (it's a bunch of numbers), the output is quite simple (it's a neatly formatted string), but the process in the middle is... a mess. I'd like to find a more readable way of doing stuff like this. It's not just this specific function; any general hints would be good. ;-)

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to