monoid module

This commit is contained in:
Stephen Diehl
2016-12-12 16:21:49 +00:00
parent c7eeb5349e
commit d6d1004070
2 changed files with 39 additions and 3 deletions
+17 -3
View File
@@ -1,26 +1,40 @@
Functor
=======
```haskell
foreach :: Functor f => f a -> (a -> b) -> f b
```
#### map
```haskell
map :: Functor f => (a -> b) -> f a -> f b
```
#### $>
```haskell
($>) :: Functor f => f a -> b -> f b
```
#### <$>
```haskell
(<$>) :: Functor f => (a -> b) -> f a -> f b
```
#### <<$>>
```haskell
(<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b)
```
#### void
```haskell
void :: Functor f => f a -> f ()
```
#### foreach
```haskell
foreach :: Functor f => f a -> (a -> b) -> f b
```
+22
View File
@@ -4,6 +4,28 @@ Monoid
Monoid
------
#### mempty
```haskell
mempty :: Monoid a => a
```
#### <>
```haskell
(<>) :: Monoid m => m -> m -> m
```
```haskell
mappend :: Monoid a => a -> a -> a
```
#### mconcat
```haskell
mconcat :: Monoid a => [a] -> a
```
Semigroup
---------