From bd03d899a85a411ee9c68a97a2217cca40954e3c Mon Sep 17 00:00:00 2001 From: "Ian Hofmann-Hicks (evil)" Date: Mon, 15 Jan 2018 15:09:23 -0800 Subject: [PATCH] address feedback add reviewers as contribs --- .all-contributorsrc | 12 +++++++++++- README.md | 4 ++-- src/Maybe/README.md | 24 +++++++++++++----------- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index c7bdf618f..b9e193075 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -54,7 +54,8 @@ "profile": "https://robertwpearce.com", "contributions": [ "bug", - "code" + "code", + "review" ] }, { @@ -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" + ] } ] } diff --git a/README.md b/README.md index 2fe606ff5..6edb3a373 100644 --- a/README.md +++ b/README.md @@ -262,8 +262,8 @@ Thanks goes to these wonderful people ([emoji key][emojis]): -| [
Ian Hofmann-Hicks](https://github.com/evilsoft)
[💻](https://github.com/evilsoft/crocks/commits?author=evilsoft "Code") [📖](https://github.com/evilsoft/crocks/commits?author=evilsoft "Documentation") [📹](#video-evilsoft "Videos") | [
Ryan](https://github.com/rstegg)
[💻](https://github.com/evilsoft/crocks/commits?author=rstegg "Code") [🐛](https://github.com/evilsoft/crocks/issues?q=author%3Arstegg "Bug reports") | [
Andrew Van Slaars](http://vanslaars.io)
[📖](https://github.com/evilsoft/crocks/commits?author=avanslaars "Documentation") | [
Henrique Limas](https://github.com/HenriqueLimas)
[💻](https://github.com/evilsoft/crocks/commits?author=HenriqueLimas "Code") [📖](https://github.com/evilsoft/crocks/commits?author=HenriqueLimas "Documentation") | [
Robert Pearce](https://robertwpearce.com)
[🐛](https://github.com/evilsoft/crocks/issues?q=author%3Arpearce "Bug reports") [💻](https://github.com/evilsoft/crocks/commits?author=rpearce "Code") | [
Scott McCormack](https://github.com/flintinatux)
[🐛](https://github.com/evilsoft/crocks/issues?q=author%3Aflintinatux "Bug reports") | -| :---: | :---: | :---: | :---: | :---: | :---: | +| [
Ian Hofmann-Hicks](https://github.com/evilsoft)
[💻](https://github.com/evilsoft/crocks/commits?author=evilsoft "Code") [📖](https://github.com/evilsoft/crocks/commits?author=evilsoft "Documentation") [📹](#video-evilsoft "Videos") | [
Ryan](https://github.com/rstegg)
[💻](https://github.com/evilsoft/crocks/commits?author=rstegg "Code") [🐛](https://github.com/evilsoft/crocks/issues?q=author%3Arstegg "Bug reports") | [
Andrew Van Slaars](http://vanslaars.io)
[📖](https://github.com/evilsoft/crocks/commits?author=avanslaars "Documentation") | [
Henrique Limas](https://github.com/HenriqueLimas)
[💻](https://github.com/evilsoft/crocks/commits?author=HenriqueLimas "Code") [📖](https://github.com/evilsoft/crocks/commits?author=HenriqueLimas "Documentation") | [
Robert Pearce](https://robertwpearce.com)
[🐛](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") | [
Scott McCormack](https://github.com/flintinatux)
[🐛](https://github.com/evilsoft/crocks/issues?q=author%3Aflintinatux "Bug reports") | [
Fred Daoud](http://www.fdaoud.com)
[👀](#review-foxdonut "Reviewed Pull Requests") | +| :---: | :---: | :---: | :---: | :---: | :---: | :---: | ### Course/Videos diff --git a/src/Maybe/README.md b/src/Maybe/README.md index 01c8f7d78..a88b9ec35 100644 --- a/src/Maybe/README.md +++ b/src/Maybe/README.md @@ -4,13 +4,13 @@ Maybe a = Nothing | Just a ``` -Defined as a Sum Type with it's Left side fixed to `()` (`Nothing`), `Maybe` is +Defined as a Sum Type with its left side fixed to `()` (`Nothing`), `Maybe` is well suited for capturing disjunction when the cause of the "error" case does not need to be communicated. For example, providing default values on specific conditions. A `Maybe` represents disjunction by using (2) constructors, `Nothing` or `Just`. -A `Just` instance represents the truth case while, `Nothing` is considered +A `Just` instance represents the truth case while `Nothing` is considered false. With the exception of [`coalesce`](#coalesce), all `Maybe` returning methods on an instance will be applied to a `Just` returning the result. If an instance is a `Nothing`, then all application is skipped and another `Nothing` @@ -126,8 +126,8 @@ Maybe.Just :: a -> Maybe a ``` Used to construct a `Just` instance that represents the "true" portion of a -disjunction or a valid value. `Just` will wrap any given value in a `Just`, -which signals the validity of the wrapped value. +disjunction or a valid value. `Just` will wrap any given value in +a `Just`, signalling the validity of the wrapped value. ```javascript const { Just, Nothing } = require('crocks/Maybe') @@ -165,10 +165,11 @@ Maybe.of :: a -> Maybe a ``` Used to wrap any value into a `Maybe` as a `Just`, `of` is used mostly by -helper functions that work "generically" with `Applicative` or `Monad` types -instances. When working specifically with the `Maybe` type, the [`Just`](#just) -constructor should be used. Reach for `of` when working with functions that will -work with ANY `Applicative`/`Monad`. +helper functions that work "generically" with instances of +either `Applicative` or `Monad`. When working specifically with +the `Maybe` type, the [`Just`](#just) constructor should be used. Reach +for `of` when working with functions that will work with +ANY `Applicative`/`Monad`. ```javascript const Maybe = require('crocks/Maybe') @@ -393,10 +394,10 @@ sumList([ 'three', 4, 'five' ]) Maybe a ~> (a -> b) -> Maybe b ``` -Used to apply transformations to values in the safely of a `Maybe`, `map` takes +Used to apply transformations to values in the safety of a `Maybe`, `map` takes a function that it will lift into the context of the `Maybe` and apply to it -the wrapped value. When ran on a `Just` instance, `map` will wrapped value to -the provided function and return the result in a new `Just` instance. +the wrapped value. When ran on a `Just` instance, `map` will apply the wrapped +value to the provided function and return the result in a new `Just` instance. ```javascript @@ -566,6 +567,7 @@ Just('hello') Maybe.of(add) .ap(Just(29)) .ap(Nothing()) +//=> Nothing fullName({ first: 'Joey', last: 'Fella' }) //=> Just "Joey Fella"