Join Slack
Powered by
Hi! Is there a more Arrow-ish way to achieve this?...
# arrow
l
Lucas Rango
05/17/2023, 12:43 PM
Hi! Is there a more Arrow-ish way to achieve this?
Copy code
fun <A, B> Either<A, B>?.f(): Either<A, B?> = this ?: null.right()
s
simon.vergauwen
05/17/2023, 1:23 PM
Hey
@Lucas Rango
, No, there is nothing special functionality for this in Arrow Core since we’ve always felt that
?:
is easier to understand for most people.
3
Views
Open in Slack
Previous
Next