- Avoid using `boolean` method `match` when unecessary
> Why? boolean.match can reduce the global understanding of a method and enforce nested pipes. Using classic `if/else` is often the best option
```typescript
// Bad
const myFunc = (condition: boolean) => pipe(
condition === true,
boolean.match(
() => doSomethingOnFalse(...),
() => doSomethingOnTrue(...)
)
);
// Good
const myFunc = (condition: boolean) => {
if (condition === true) {
return doSomethingOnTrue(...);
}
return doSomethingOnFalse(...);
};
```
- Split piping from logical actions
> Why? Mixing them makes it harder to understand and read the code. We want to favor the usage of atomic methods that do not know anything about the piping