[Haskell-cafe] ANN: HLint 1.2

Derek Elkins derek.a.elkins at gmail.com
Mon Jan 12 17:59:25 EST 2009


On Mon, 2009-01-12 at 20:23 +0100, Bas van Dijk wrote:
> On Mon, Jan 12, 2009 at 6:06 PM, Robin Green <greenrd at 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.



More information about the Haskell-Cafe mailing list