Open tunnckoCore opened 7 years ago
@charlike instead of assertions you need to use the Validation applicative functor.
const result = validation.bind(function(val) {
if (val == "hi") {
return Validation.success("world")
} else {
return Validation.fail("wow, you really failed.")
}
});
It's true that i'm not so fully FP, not so hardcore FP
then this rule-set is not for you.
Currently, i almost don't see how it can be used, even in FP. It's true that i'm not so fully FP, not so hardcore FP, but it fails for simple things like asserting. Isn't it too aggressive?
Can you should some "real" examples that may pass that rule? It's pretty cool and i like it, mostly.