Skip to content

Commit 3978034

Browse files
committed
Better fix definition
Resolves #48
1 parent 46a65db commit 3978034

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Control/Lazy.purs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ instance lazyUnit :: Lazy Unit where
2020
-- |
2121
-- | The `Lazy` instance allows us to generate the result lazily.
2222
fix :: forall l. Lazy l => (l -> l) -> l
23-
fix f = defer (\_ -> f (fix f))
23+
fix f = go
24+
where
25+
go = defer \_ -> f go

0 commit comments

Comments
 (0)