Hi there how would I do something like `(+) <$&...
# arrow
s
Hi there how would I do something like
(+) <$> Right 1 <*> Right 2
(Haskell) using arrow in kotlin. Going through the docs it felt like I should do something like
Either.applicative().run { Right(1).map2(Right(2)) {(i, j) -> i + j } }
but this does not look like it's working the code inspection tools continues to ask me to provide more type info. in the applicative function which has me completely stumped. (Disclaimer: New to kotlin as in 1 week new to kotlin) Also is there some better api to achieve this? Something like
Applicative.lift2( (a, b) -> a + b, Right(1), RIght(2))
?