Skip to content

Commit 4c7733c

Browse files
committed
Merge pull request purescript#455 from pelotom/patch-1
Add `void` function
2 parents a43b772 + ea73930 commit 4c7733c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

prelude/prelude.purs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module Prelude
77
, ($), (#)
88
, (:), cons
99
, Show, show
10-
, Functor, (<$>)
10+
, Functor, (<$>), void
1111
, Apply, (<*>)
1212
, Applicative, pure, liftA1
1313
, Alternative, empty, (<|>)
@@ -116,6 +116,9 @@ module Prelude
116116
class Functor f where
117117
(<$>) :: forall a b. (a -> b) -> f a -> f b
118118

119+
void :: forall f a. (Functor f) => f a -> f Unit
120+
void fa = const unit <$> fa
121+
119122
infixl 4 <*>
120123

121124
class (Functor f) <= Apply f where

0 commit comments

Comments
 (0)