isOk

Result.isOk returns whether or not the result is Ok

Result<T, E>.isOk(): boolean;

Example


div(2, 2).isOk(); // => true

div(2, 0).isOk(); // => false