Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "monadsjs", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Ready to use monads in examples", | ||
@@ -5,0 +5,0 @@ "main": "lib/monads.js", |
@@ -35,4 +35,4 @@ # monadsjs | ||
Maybe monad represents a value (`Just`) or monadic zero (`Nothing`). It's very convinient way to just | ||
literally let your code fail. Instead of writing multiple checks and try-catches just check type of | ||
Maybe monad represents a value (`Just`) or monadic zero (`Nothing`). It's very convinient way to | ||
literally, let your code fail. Instead of writing multiple checks and try-catches just check type of | ||
the value at the end of transformations chain. In this particular implementation Maybe is just a | ||
@@ -62,4 +62,4 @@ union type which exists only if you are using TypeScript. | ||
// Nothing.unit :: () -> Nothing | ||
// Nothing.bind :: (a -> Just b | Nothing) -> | Nothing | ||
// Nothing.map :: (a -> b) -> | Nothing | ||
// Nothing.bind :: (a -> Just b | Nothing) -> Nothing | ||
// Nothing.map :: (a -> b) -> Nothing | ||
@@ -116,4 +116,5 @@ const firstWordLength = words => words[0].length; | ||
(here I have Haskell in mind). In JavaScript we can take an advantage of IO monads to change unpure | ||
functions into pure which makes them easy to test. `IO.equals` makes it easy to deep compare two IO | ||
monads. | ||
functions into pure which makes them easy to test. This implementation is also | ||
a [Setoid](https://github.com/hemanth/functional-programming-jargon#setoid). `IO.equals` makes it | ||
easy to deeply compare two IO monads. | ||
@@ -138,3 +139,3 @@ ```js | ||
Promise out of the box is a grate Continuation monad implementation! `Promise.resolve` corresponds | ||
Promise out of the box is a great Continuation monad implementation! `Promise.resolve` corresponds | ||
to `unit` and `Promise.then` corresponds to `bind`. Provided Continuation implementation is a minimal | ||
@@ -141,0 +142,0 @@ wrapper for Promise with methods you know from other monads (`bind` and `unit`). Don't use it, use |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
NPM Shrinkwrap
Supply chain riskPackage contains a shrinkwrap file. This may allow the package to bypass normal install procedures.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
87992
25
1563
223
2