utility functions

This commit is contained in:
Stephen Diehl
2016-12-10 16:01:47 +00:00
parent 00c2fce11a
commit 6cb17bb94b
8 changed files with 159 additions and 2 deletions
+35
View File
@@ -1,2 +1,37 @@
Monoid
======
Monoid
------
Semigroup
---------
```haskell
option :: b -> (a -> b) -> Option a -> b
```
```haskell
diff :: Semigroup m => m -> Endo m
```
```haskell
cycle1 :: Semigroup m => m -> m
```
```haskell
stimesMonoid :: (Integral b, Monoid a) => b -> a -> a
```
```haskell
stimesIdempotent :: Integral b => b -> a -> a
```
```haskell
stimesIdempotentMonoid :: (Integral b, Monoid a) => b -> a -> a
```
```haskell
mtimesDefault :: (Integral b, Monoid a) => b -> a -> a
```