Name: Anonymous 2008-05-09 13:15
Use the loeb function:
To implement a basic spreadsheet processor. The processor should accept input of the form:
The output from this example should be:
Cells may contain number literals, references to other cells of the form <letter><number>, or function applications of the form (<function> *<args>).
loeb :: Functor a => a (a x -> x) -> a x
loeb x = fmap (\a -> a (loeb x)) xTo implement a basic spreadsheet processor. The processor should accept input of the form:
|##|A |B |C |D |
|01|(* B1 C1)|2 |3 |(* A1 2)|The output from this example should be:
|##|A |B |C |D |
|01|6 |2 |3 |12 |Cells may contain number literals, references to other cells of the form <letter><number>, or function applications of the form (<function> *<args>).