DEV Community

[Comment from a deleted post]
Collapse
 
belgoros profile image
Serguei Cambour • Edited

Good to know the possibility to use Kernel-level functions '*', '<', etc. with the pipe operator...
But it decreases the readability of the code very much (personal opinion).
You could just use pattern matching and define 2 methods to drop the conditional if checking the a < 0.