associatedtypeand they make the extension implement the functions but not the actual protocols themselves. Not sure how they can do ad hoc polymorphism then or if their type classes are just syntax over data types.
Functor3that I suggested above, but IMO it is wrong since they have both
Bassociated with the protocol
Anyin order. So the
Bifunctorextensions which does not implement the protocol declare values for A, B etc which they don't have to fill in in other extensions https://github.com/typelift/Swiftz/blob/master/Sources/Swiftz/EitherExt.swift#L14
Maybefor the option type, since the native version is named
Optional, but the guy posting the issue suggests to rename it to
Optionto match Arrow and other libs conventions. I don't have a clear opinion on this and decided to go for
Maybeto make it easily distinguishable from the native one, but I'd like to hear other opinions as well.
Hi Good morning! I’m just playing around with bow and I have a noob question. I’m trying to writting a simple Yoneda but I ain’t able to do it :(
Here is my code:
let maybe = Either<String,Int>.right(2) let h = Yoneda.functor(maybe)
And it’ saying Argument type 'Either<String, Int>' does not conform to expected type 'Functor'