Skip to content

Commit 139584a

Browse files
matthewleonpaf31
authored andcommitted
trivial Lazy instance for Unit (#40)
1 parent efaccc9 commit 139584a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Control/Lazy.purs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ class Lazy l where
1313
instance lazyFn :: Lazy (a -> b) where
1414
defer f = \x -> f unit x
1515

16+
instance lazyUnit :: Lazy Unit where
17+
defer _ = unit
18+
1619
-- | `fix` defines a value as the fixed point of a function.
1720
-- |
1821
-- | The `Lazy` instance allows us to generate the result lazily.

0 commit comments

Comments
 (0)