Johann Pardanaud
12/07/2023, 12:29 PMbind()
extension function to bind Akkurate's ValidationResult to Arrow's Raise blocks:
either {
someResult.bind()
}
However, this requires to use context receivers, which are currently JVM-only.
What would you recommend to support multiplatform?
Having two extension functions? One with context receivers for JVM, and another one with a parameter for other targets?
@context(Raise<NonEmptySet<ConstraintViolation>>)
fun <T> ValidationResult<T>.bind()
fun <T> Raise<NonEmptySet<ConstraintViolation>>.bind(validationResult: ValidationResult<T>)
Alejandro Serrano.Mena
12/07/2023, 12:37 PMJohann Pardanaud
12/07/2023, 12:46 PMAlejandro Serrano.Mena
12/07/2023, 12:47 PMRaiseAccumulate
extending Raise
Alejandro Serrano.Mena
12/07/2023, 12:48 PMJohann Pardanaud
12/07/2023, 12:53 PM