mirror of
https://github.com/IBM/fp-go.git
synced 2025-11-29 22:38:29 +02:00
fix: add auto generation for Eitherize
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
@@ -52,6 +52,7 @@ func MonadFold[E, A, B any](ma Either[E, A], onLeft func(e E) B, onRight func(a
|
||||
return onRight(ma.right)
|
||||
}
|
||||
|
||||
// Unwrap converts an Either into the idiomatic tuple
|
||||
func Unwrap[E, A any](ma Either[E, A]) (A, E) {
|
||||
return ma.right, ma.left
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user