Open CorentinClabaut opened 1 year ago
I also want there:
func Map[T, R any](a Functor[T], f func(value T) R) Functor[R]
func Ap[T, R any](a Applicative[T], ff Applicative[func(value T) R]) Applicative[R]
func FlatMap[T, R any](a Monad[T], f func(value T) Monad[R]) Monad[R]
But I'm not sure these can be implemented in Go.
I would love to have this function too. Was thinking that the name "Merge" could also describe it well, but maybe it's called map in other languages? 🤷 What does haskel call it?
Could we have a helper function like the following for
Either
?It would be useful to be able to Map an Either to another type.