On Mon, 2009-01-12 at 20:23 +0100, Bas van Dijk wrote:
> On Mon, Jan 12, 2009 at 6:06 PM, Robin Green <gree...@greenrd.org> wrote:
> > The fix-style equivalent to your repeat above, would be something like
> > this:
> >
> > repeat x = fix $ \me -> x ::: me
> 
> Interesting.

The definition of fix is small and non-recursive, in particular it is:
fix f = let x = f x in x
When inlined, which it -will- be if optimizations are enabled, 
fix (x:::) is -identical- to your definition of repeat.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to