utility functions
This commit is contained in:
@@ -41,6 +41,11 @@ orEmpty :: Alternative f => Bool -> a -> f a
|
||||
eitherA :: (Alternative f) => f a -> f b -> f (Either a b)
|
||||
```
|
||||
|
||||
```haskell
|
||||
pass :: Applicative f => f ()
|
||||
```
|
||||
|
||||
|
||||
Alternative
|
||||
-------
|
||||
|
||||
@@ -75,3 +80,11 @@ liftA :: Applicative f => (a -> b) -> f a -> f b
|
||||
```haskell
|
||||
empty :: Alternative f => f a
|
||||
```
|
||||
|
||||
```haskell
|
||||
guarded :: (Alternative f) => (a -> Bool) -> a -> f a
|
||||
```
|
||||
|
||||
```haskell
|
||||
guardedA :: (Functor f, Alternative t) => (a -> f Bool) -> a -> f (t a)
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user