Open ghost opened 6 years ago
Great points, @profetasajt !! Would you mind creating a PR with your suggested changes? And if you manage to remove cowboy from the examples and make them less verbose in general, that would be highly appreciated as well.
Altough bad/1 defines inequalty, the pattern matching in both of better/1 and good/1 defines equalty between Transport and cowboy_spdy. As this example has a logic to present the transformation, the better/1 and good/1 should be corrected while bad/1 still remains unchanged.
Furthermore arithmetic comparisons between more values (at least 3) and a variable, range checking examples should be even presented here to present the readability differences and to help the reasoning why do not use if's.