-
Easier to reason about
- a pure function tells everything you need to know about the function. No hidden I/O, no external variables modified, no instance or even global variables to hunt down.
-
Easier to test
- since the same input(s) always return the same output(s), they're easy to test. Provide the input and expected output. Simple! No need for setup, teardown, or mocking.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ verbose=on | |
+ shift | |
+ [[ -n '' ]] | |
+ get_distro | |
+ get_bold | |
+ case "$ascii_bold" in | |
+ ascii_bold='\033[1m' | |
+ case "$bold" in | |
+ bold='\033[1m' | |
+ get_distro_colors |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.