Colton Idle
04/04/2023, 3:32 PMYoussef Shoaib [MOD]
04/04/2023, 3:35 PMrequire function (for parameters) or the ensure function (for the state of a class). Or you could have a value class PositiveInt internal constructor(val underlying: Int) that has a require statement in its initializer and a nullable factory function fun PositiveInt(int: Int): PositiveInt?Chris Lee
04/04/2023, 3:36 PMrequire or check to handle verification conditions.Szymon Chaber
04/04/2023, 3:40 PMChris Lee
04/04/2023, 3:43 PMColton Idle
04/04/2023, 3:53 PMChris Lee
04/04/2023, 3:54 PMrequire is for validating inputs, check is for validating state, and error can be used for anything else.