Skip to content

Commit 08a48ff

Browse files
authored
Merge pull request #244 from jsoref/fix-readme-jargon
Fix case of Some and None
2 parents ce4cc3e + cb44743 commit 08a48ff

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

readme.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ object.map(f).map(g)
482482
The reference implementation of [Option](#option) is a functor as it satisfies the rules:
483483

484484
```js
485-
some(1).map(x => x) // = some(1)
485+
Some(1).map(x => x) // = Some(1)
486486
```
487487

488488
and
@@ -491,8 +491,8 @@ and
491491
const f = x => x + 1
492492
const g = x => x * 2
493493

494-
some(1).map(x => g(f(x))) // = some(4)
495-
some(1).map(f).map(g) // = some(4)
494+
Some(1).map(x => g(f(x))) // = Some(4)
495+
Some(1).map(f).map(g) // = Some(4)
496496
```
497497

498498
## Pointed Functor
@@ -736,11 +736,11 @@ Using [Option](#option):
736736
// safeParseNum :: String -> Option Number
737737
const safeParseNum = (b) => {
738738
const n = parseNumber(b)
739-
return isNaN(n) ? none() : some(n)
739+
return isNaN(n) ? None() : Some(n)
740740
}
741741

742742
// validatePositive :: Number -> Option Number
743-
const validatePositive = (a) => a > 0 ? some(a) : none()
743+
const validatePositive = (a) => a > 0 ? Some(a) : None()
744744

745745
// kleisliCompose :: Monad M => ((b -> M c), (a -> M b)) -> a -> M c
746746
const kleisliCompose = (g, f) => (x) => f(x).chain(g)

0 commit comments

Comments
 (0)