I'm writing a library that I want to be cross comp...
# arrow
k
I'm writing a library that I want to be cross compiled to iOS. I have a function type which returns an
Either
eg:
(Any) -> Either<A, B>
and I want Swift authors to be able to write functions that conform to that signature to be passed into functions in my library. That way I can delegate certain platform specific ideas to the platform. However I can't seem to be able to create an
Either
in Swift code. Looking in the MPP generated headers, I can see the
Arrow_coreEither
type with its methods (eg:
bimap
) but I can't find the
Right
or
Left
constructors. Is there something I have to do in my Kotlin project to expose the types properly? Has anyone done this successfully?
s
Is this what you are looking for?