Skip to content

Commit

Permalink
trivial Lazy instance for Unit (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewleon authored and paf31 committed Jun 4, 2017
1 parent efaccc9 commit 139584a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Control/Lazy.purs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ class Lazy l where
instance lazyFn :: Lazy (a -> b) where
defer f = \x -> f unit x

instance lazyUnit :: Lazy Unit where
defer _ = unit

-- | `fix` defines a value as the fixed point of a function.
-- |
-- | The `Lazy` instance allows us to generate the result lazily.
Expand Down

0 comments on commit 139584a

Please sign in to comment.