Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

/prog/ challenge [HASKELL]

Name: Anonymous 2008-05-09 13:15

Use the loeb function:
loeb :: Functor a => a (a x -> x) -> a x
loeb x = fmap (\a -> a (loeb x)) x


To 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>).

Name: hasklol 2009-07-01 14:02

>>8
Haskell was made without side-effects (lol pure). Then everyone was like, "Fuck, we need sonuvabitching side-effects to do any goddamn thing!" So they let them back in. But then they were like, "Shit, lazy evaluation means crap is happening in fucked-up ways we can't motherfucking cocksucking asshole dick predict!" Hence, monads.

IOW: Monads are a way of [doing what every other language already does by] separating purity and impurity in a lazy language.

...

For the sake of clarity. XD XD XD

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List