Submitted by shapr on Mon, 03/21/2005 - 9:08am.
Freshman
Sophomore
Junior
Senior
Memoizing
Points-free
Iterative
Accumulating
Continuation-passing
Boy Scout
Combinatory
List-encoding
0% (1 vote)
Interpretive
Static
Origamist
Cartesianally-inclined
0% (1 vote)
Ph.D.
Post-doc
Tenured professor

Why is this poll closed after one vote?
Moreover, why is the result posted on the front page?

I don't know, but I've re-opened it.

It seems that there are spam trackbacks, is there something we can do about that?

I try to delete the spam when I see it. If I've missed some, please let me know.

Drupal's spam module is reasonably effective with comments, but not so much with trackbacks (it doesn't actually integrate with the trackback module yet). I could simply disable trackbacks; let me know what you think of that.

I'm at the Monad stage.

Its not listed in the Evolution, so here is my little contribution. I'm afraid I can't get the formatting to come out, so you'll have to infer it.

``` module FactorialMonad (factorial, Factorial) where```

``` import Control.Monad.State -- Declare the Factorial monad as a State holding two integers. -- The first is the counter, the second is the accumulator. With -- each tick the accumulator is multiplied by the counter and the -- counter is incremented. type Factorial = State (Integer, Integer) -- Declare the initial state and the state modifier factorialZero :: (Integer, Integer) factorialZero = (0,1) -- A 'tick' is a state computation that moves to the next factorial -- and returns it. tick :: Factorial Integer tick = do modify next gets snd where next (c, a) = (c+1, a * (c+1)) -- 'value' is a state computation that returns the current factorial. value :: Factorial Integer value = gets snd -- The computation for 'factorial n' is therefore a sequence of n ticks. factorial :: Int -> Integer factorial n = evalState factorial' factorialZero where computation = sequence_ \$ replicate n tick factorial' = do computation value ```
``` ```
``` Login to post comments ```
``` It's points-free for me: fac Submitted by dtlin on Wed, 09/07/2005 - 12:49pm. It's points-free for me: fac = product . enumFromTo 1 Login to post comments Comment viewing options Flat list - collapsedFlat list - expandedThreaded list - collapsedThreaded list - expanded Date - newest firstDate - oldest first 10 comments per page30 comments per page50 comments per page70 comments per page90 comments per page150 comments per page200 comments per page250 comments per page300 comments per page Select your preferred way to display the comments and click "Save settings" to activate your changes. ```
``` ```