document structure
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
Applicative
|
||||
===========
|
||||
|
||||
#### Functor
|
||||
Functor
|
||||
~~~~~~~
|
||||
|
||||
```haskell
|
||||
class Functor (f :: * -> *) where
|
||||
@@ -17,7 +18,8 @@ class Functor (f :: * -> *) where
|
||||
($>) :: Functor f => f a -> b -> f b
|
||||
```
|
||||
|
||||
#### Applicatives
|
||||
Applicatives
|
||||
~~~~~~~~~~~~
|
||||
|
||||
```haskell
|
||||
class Functor f => Applicative (f :: * -> *) where
|
||||
@@ -43,7 +45,8 @@ orEmpty :: Alternative f => Bool -> a -> f a
|
||||
eitherA :: (Alternative f) => f a -> f b -> f (Either a b)
|
||||
```
|
||||
|
||||
#### Alternative
|
||||
Alternative
|
||||
~~~~~~~~~~~
|
||||
|
||||
```haskell
|
||||
class Applicative f => Alternative (f :: * -> *) where
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
Bool
|
||||
=====
|
||||
@@ -0,0 +1,2 @@
|
||||
Either
|
||||
======
|
||||
@@ -0,0 +1,2 @@
|
||||
Folds
|
||||
=====
|
||||
+14
-7
@@ -1,7 +1,8 @@
|
||||
List
|
||||
====
|
||||
|
||||
#### Slicing
|
||||
Slicing
|
||||
~~~~~~~
|
||||
|
||||
```haskell
|
||||
head :: Foldable f => f a -> Maybe a
|
||||
@@ -47,7 +48,8 @@ drop :: Int -> [a] -> [a]
|
||||
take :: Int -> [a] -> [a]
|
||||
```
|
||||
|
||||
#### Unpacking
|
||||
Unpacking
|
||||
~~~~~~~~~
|
||||
|
||||
```haskell
|
||||
uncons :: [a] -> Maybe (a, [a])
|
||||
@@ -57,19 +59,22 @@ uncons :: [a] -> Maybe (a, [a])
|
||||
unsnoc :: [x] -> Maybe ([x],x)
|
||||
```
|
||||
|
||||
#### Sorting
|
||||
Sorting
|
||||
~~~~~~~~~
|
||||
|
||||
```haskell
|
||||
sortOn :: Ord o => (a -> o) -> [a] -> [a]
|
||||
```
|
||||
|
||||
#### Removing
|
||||
Removing
|
||||
~~~~~~~~~
|
||||
|
||||
```haskell
|
||||
ordNub :: Ord a => [a] -> [a]
|
||||
```
|
||||
|
||||
#### Splitting
|
||||
Splitting
|
||||
~~~~~~~~~
|
||||
|
||||
```haskell
|
||||
splitAt :: Int -> [a] -> ([a], [a])
|
||||
@@ -83,13 +88,15 @@ splitAt :: Int -> [a] -> ([a], [a])
|
||||
intercalate :: [a] -> [[a]] -> [a]
|
||||
```
|
||||
|
||||
#### Comparison
|
||||
Comparison
|
||||
~~~~~~~~~
|
||||
|
||||
```haskell
|
||||
isPrefixOf :: Eq a => [a] -> [a] -> Bool
|
||||
```
|
||||
|
||||
#### Filter
|
||||
Filtering
|
||||
~~~~~~~~~
|
||||
|
||||
```haskell
|
||||
filter :: (a -> Bool) -> [a] -> [a]
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
Maybe
|
||||
=====
|
||||
+4
-2
@@ -1,7 +1,8 @@
|
||||
Monads
|
||||
======
|
||||
|
||||
#### Monad
|
||||
Monad
|
||||
~~~~~
|
||||
|
||||
```haskell
|
||||
class Applicative m => Monad (m :: * -> *) where
|
||||
@@ -119,7 +120,8 @@ ap :: Monad m => m (a -> b) -> m a -> m b
|
||||
(<$!>) :: Monad m => (a -> b) -> m a -> m b
|
||||
```
|
||||
|
||||
#### MonadPlus
|
||||
MonadPlus
|
||||
~~~~~~~~~
|
||||
|
||||
```haskell
|
||||
class (Alternative m, Monad m) => MonadPlus (m :: * -> *) where
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
Monoid
|
||||
======
|
||||
@@ -0,0 +1,2 @@
|
||||
Numbers
|
||||
=======
|
||||
@@ -0,0 +1,14 @@
|
||||
Strings
|
||||
=======
|
||||
|
||||
Text
|
||||
~~~~
|
||||
|
||||
LText
|
||||
~~~~
|
||||
|
||||
Bytestring
|
||||
~~~~~~~~~~
|
||||
|
||||
LBytestring
|
||||
~~~~~~~~~~~
|
||||
+2
-2
@@ -4,7 +4,7 @@ Protolude Documentation
|
||||
An alternative Prelude.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:maxdepth: 0
|
||||
Printing
|
||||
Files
|
||||
Strings
|
||||
@@ -28,7 +28,7 @@ An alternative Prelude.
|
||||
ST
|
||||
Concurrency
|
||||
Storable
|
||||
Systsem
|
||||
System
|
||||
Map
|
||||
Set
|
||||
Tuple
|
||||
|
||||
Reference in New Issue
Block a user