Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Maybe Documentation #185

Merged
merged 2 commits into from
Jan 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
"profile": "https://robertwpearce.com",
"contributions": [
"bug",
"code"
"code",
"review"
]
},
{
Expand All @@ -65,6 +66,15 @@
"contributions": [
"bug"
]
},
{
"login": "foxdonut",
"name": "Fred Daoud",
"avatar_url": "https://avatars3.githubusercontent.com/u/1706600?v=4",
"profile": "http://www.fdaoud.com",
"contributions": [
"review"
]
}
]
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ Thanks goes to these wonderful people ([emoji key][emojis]):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore -->
| [<img src="https://avatars1.githubusercontent.com/u/3665793?v=4" width="100px;"/><br /><sub><b>Ian Hofmann-Hicks</b></sub>](https://github.com/evilsoft)<br />[💻](https://github.com/evilsoft/crocks/commits?author=evilsoft "Code") [📖](https://github.com/evilsoft/crocks/commits?author=evilsoft "Documentation") [📹](#video-evilsoft "Videos") | [<img src="https://avatars0.githubusercontent.com/u/19234385?v=4" width="100px;"/><br /><sub><b>Ryan</b></sub>](https://github.com/rstegg)<br />[💻](https://github.com/evilsoft/crocks/commits?author=rstegg "Code") [🐛](https://github.com/evilsoft/crocks/issues?q=author%3Arstegg "Bug reports") | [<img src="https://avatars0.githubusercontent.com/u/1271181?v=4" width="100px;"/><br /><sub><b>Andrew Van Slaars</b></sub>](http://vanslaars.io)<br />[📖](https://github.com/evilsoft/crocks/commits?author=avanslaars "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/2222191?v=4" width="100px;"/><br /><sub><b>Henrique Limas</b></sub>](https://github.com/HenriqueLimas)<br />[💻](https://github.com/evilsoft/crocks/commits?author=HenriqueLimas "Code") [📖](https://github.com/evilsoft/crocks/commits?author=HenriqueLimas "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/592876?v=4" width="100px;"/><br /><sub><b>Robert Pearce</b></sub>](https://robertwpearce.com)<br />[🐛](https://github.com/evilsoft/crocks/issues?q=author%3Arpearce "Bug reports") [💻](https://github.com/evilsoft/crocks/commits?author=rpearce "Code") | [<img src="https://avatars1.githubusercontent.com/u/888052?v=4" width="100px;"/><br /><sub><b>Scott McCormack</b></sub>](https://github.com/flintinatux)<br />[🐛](https://github.com/evilsoft/crocks/issues?q=author%3Aflintinatux "Bug reports") |
| :---: | :---: | :---: | :---: | :---: | :---: |
| [<img src="https://avatars1.githubusercontent.com/u/3665793?v=4" width="100px;"/><br /><sub><b>Ian Hofmann-Hicks</b></sub>](https://github.com/evilsoft)<br />[💻](https://github.com/evilsoft/crocks/commits?author=evilsoft "Code") [📖](https://github.com/evilsoft/crocks/commits?author=evilsoft "Documentation") [📹](#video-evilsoft "Videos") | [<img src="https://avatars0.githubusercontent.com/u/19234385?v=4" width="100px;"/><br /><sub><b>Ryan</b></sub>](https://github.com/rstegg)<br />[💻](https://github.com/evilsoft/crocks/commits?author=rstegg "Code") [🐛](https://github.com/evilsoft/crocks/issues?q=author%3Arstegg "Bug reports") | [<img src="https://avatars0.githubusercontent.com/u/1271181?v=4" width="100px;"/><br /><sub><b>Andrew Van Slaars</b></sub>](http://vanslaars.io)<br />[📖](https://github.com/evilsoft/crocks/commits?author=avanslaars "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/2222191?v=4" width="100px;"/><br /><sub><b>Henrique Limas</b></sub>](https://github.com/HenriqueLimas)<br />[💻](https://github.com/evilsoft/crocks/commits?author=HenriqueLimas "Code") [📖](https://github.com/evilsoft/crocks/commits?author=HenriqueLimas "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/592876?v=4" width="100px;"/><br /><sub><b>Robert Pearce</b></sub>](https://robertwpearce.com)<br />[🐛](https://github.com/evilsoft/crocks/issues?q=author%3Arpearce "Bug reports") [💻](https://github.com/evilsoft/crocks/commits?author=rpearce "Code") [👀](#review-rpearce "Reviewed Pull Requests") | [<img src="https://avatars1.githubusercontent.com/u/888052?v=4" width="100px;"/><br /><sub><b>Scott McCormack</b></sub>](https://github.com/flintinatux)<br />[🐛](https://github.com/evilsoft/crocks/issues?q=author%3Aflintinatux "Bug reports") | [<img src="https://avatars3.githubusercontent.com/u/1706600?v=4" width="100px;"/><br /><sub><b>Fred Daoud</b></sub>](http://www.fdaoud.com)<br />[👀](#review-foxdonut "Reviewed Pull Requests") |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
<!-- ALL-CONTRIBUTORS-LIST:END -->

### Course/Videos
Expand Down
6 changes: 3 additions & 3 deletions docs/src/pages/docs/functions/helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ mapProps(mapping, {
`crocks/helpers/mapReduce`

```haskell
mapReduce :: Foldable f => (a -> b) -> (c -> b -> c) -> f a -> c
mapReduce :: Foldable f => (a -> b) -> (c -> b -> c) -> c -> f a -> c
```

Sometimes you need the power provided by [`mreduceMap`](#mreducemap) but you do
Expand Down Expand Up @@ -846,7 +846,7 @@ get()
`crocks/Maybe/safe`

```haskell
safe :: ((a -> Boolean) | Pred) -> a -> Maybe a
safe :: ((a -> Boolean) | Pred) -> b -> Maybe a
```

When using a `Maybe`, it is a common practice to lift into a `Just` or a
Expand All @@ -861,7 +861,7 @@ true and a `Nothing` if false.
`crocks/Maybe/safeLift`

```haskell
safeLift :: ((a -> Boolean) | Pred) -> (a -> b) -> a -> Maybe b
safeLift :: ((c -> Boolean) | Pred) -> (a -> b) -> c -> Maybe b
```

While [`safe`](#safe) is used to lift a value into a `Maybe`, you can reach for
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/docs/functions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ need to account for for the rest of your flow.
| [`liftA2`][lifta2] | `Applicative m => (a -> b -> c) -> m a -> m b -> m c` | `crocks/helpers/liftA2` |
| [`liftA3`][lifta3] | `Applicative m => (a -> b -> c -> d) -> m a -> m b -> m c -> m d` | `crocks/helpers/liftA3` |
| [`mapProps`][mapprops] | `Object -> Object -> Object` | `crocks/helpers/mapProps` |
| [`mapReduce`][mapreduce] | `Foldable f => (a -> b) -> (c -> b -> c) -> f a -> c` | `crocks/helpers/mapReduce` |
| [`mapReduce`][mapreduce] | `Foldable f => (a -> b) -> (c -> b -> c) -> c -> f a -> c` | `crocks/helpers/mapReduce` |
| [`mconcat`][mconcat] | `Monoid m, Foldable f => m -> f a -> m a` | `crocks/helpers/mconcat` |
| [`mconcatMap`][mconcatmap] | `Monoid m, Foldable f => m -> (b -> a) -> f b -> m a` | `crocks/helpers/mconcatMap` |
| [`mreduce`][mreduce] | `Monoid m, Foldable f => m -> f a -> a` | `crocks/helpers/mreduce` |
Expand Down
Loading