Created
January 10, 2021 23:07
Revisions
-
hadilq created this gist
Jan 10, 2021 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ public inline infix fun ValidationResult.elseIf(build: ValidationResultElseIfBuilder.() -> Unit): Success { if (this is Success) { return this } else { val builder = ValidationResultElseIfBuilder(this) builder.build() return builder.result } }