Pure functions can test easily
Pure functions can test easily. No setup code is required, and Assertions can be written in one line.
訳: 純粋な関数にはテストしやすいというメリットがある。セットアップコードが不要なため1行でアサートが書ける。
Grokking Functional Programming Part 1: 2 Pure Functionより。
この記事が気に入ったらサポートをしてみませんか?