Donald Bruce Stewart wrote:
P.S. Have some cute code:
Control.Monad.Fix.fix ((1:) . scanl (+) 1)
this is cute indeed! (do you keep an emergency reserve of those around
for situations like this? ;-))
ever the interested amateur, i admittedly remain stumped by fix (there's
evidence i'm
On Tue, May 29, 2007 at 12:15:23PM +0200, Vincent Kraeutler wrote:
Donald Bruce Stewart wrote:
P.S. Have some cute code:
Control.Monad.Fix.fix ((1:) . scanl (+) 1)
this is cute indeed! (do you keep an emergency reserve of those around
for situations like this? ;-))
ever the
On Tue, May 29, 2007 at 02:19:31PM +0200, Tomasz Zielonka wrote:
On Tue, May 29, 2007 at 12:15:23PM +0200, Vincent Kraeutler wrote:
ever the interested amateur, i admittedly remain stumped by fix (there's
evidence i'm not the only one [1])
The above code is equivalent to
let l = 1 :
Tomasz Zielonka wrote:
On Tue, May 29, 2007 at 02:19:31PM +0200, Tomasz Zielonka wrote:
On Tue, May 29, 2007 at 12:15:23PM +0200, Vincent Kraeutler wrote:
ever the interested amateur, i admittedly remain stumped by fix (there's
evidence i'm not the only one [1])
The above
Vincent Kraeutler wrote:
Tomasz Zielonka wrote:
[snip]
anyhow. if someone has a pedestrian's guide to the fixed point
operator lying around, a link would be much appreciated.
i see that dons has very recently provided an answer for this on reddit:
vincent:
i see that the definition of fix (from Control.Monad.Fix) could not be
any simpler:
fix f = let x = f x in x
same goes for the type:
Prelude :t Control.Monad.Fix.fix
Control.Monad.Fix.fix :: (a - a) - a
it's just that i find it difficult to get concrete intellectual
On 29/05/07, Vincent Kraeutler [EMAIL PROTECTED] wrote:
anyhow. if someone has a pedestrian's guide to the fixed point
operator lying around, a link would be much appreciated.
Here's a paraphrased quotation from Pierce's Types and Programming Languages:
Suppose we want to write a recursive
(re-joining the list -- I forgot to reply all)
Vincent Kraeutler wrote:
Roberto Zunino wrote:
Vincent Kraeutler wrote:
i see that the definition of fix (from Control.Monad.Fix) could not be
any simpler:
fix f = let x = f x in x
I actually consider
fix f = f (fix f)
to be simpler. Alas,
Vincent Kraeutler wrote:
Donald Bruce Stewart wrote:
P.S. Have some cute code:
Control.Monad.Fix.fix ((1:) . scanl (+) 1)
this is cute indeed! (do you keep an emergency reserve of those around
for situations like this? ;-))
LOL! I bet he does as well...
I don't know. I
Vincent Kraeutler wrote:
Donald Bruce Stewart wrote:
P.S. Have some cute code:
Control.Monad.Fix.fix ((1:) . scanl (+) 1)
either way, if one of the Masters Of The Shadow Y Style on this list
feels like throwing in another koan or two, you'll have at least one
thankful audience member
10 matches
Mail list logo