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.

Your repeat and mine are compiled to the same code:

Data.Stream.repeat :: forall a_aVi.
                      a_aVi -> Data.Stream.Stream a_aVi

Data.Stream.repeat =
  \ (@ a_a2lT) (x_aZ6 :: a_a2lT) ->
    letrec {
      repeat_x_s50K :: Data.Stream.Stream a_a2lT

      repeat_x_s50K = Data.Stream.::: @ a_a2lT x_aZ6 repeat_x_s50K; } in
    repeat_x_s50K

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

Reply via email to