ilya.gorbunov
07/04/2016, 6:39 PMrequire(n > 0) { "Expected n to be positive but was $n" }
– there are 2 advantages comparing to `if`:
- the condition is straight rather than inverted (if (n <= 0)
)
- no need to write throw IllegalArgumentException( )