
Hi, On 16/07/10 07:35, C K Kashyap wrote:
Haskell without using any standard library stuff?
For example, if I wanted an image representation such as this [[(Int,Int.Int)]] - basically a list of lists of 3 tuples (rgb) and wanted to do in place replacement to set the pixel values, how could I go about it.
Break the problem down into parts: 1. replace a single pixel 2. modify an element in a list at a given index using a given modification function 3. modify an element in a list of lists at a pair of given indices using a given replacement function I had a stab at it. Without any standard library stuff I couldn't figure out how to print any output, though - so who knows if the code I wrote does what I intended. The point is, it's libraries all the way down - so use them, study them where necessary for understanding, and write them and share them when you find something missing. Claude -- http://claudiusmaximus.goto10.org