[Haskell-cafe] ANN: HLint 1.2
Bas van Dijk
v.dijk.bas at gmail.com
Mon Jan 12 14:23:19 EST 2009
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.
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
More information about the Haskell-Cafe
mailing list